simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
2.1k stars 537 forks source link

Typo in pin assignment configuration for 4PWM [BUG] #183

Closed arturohernandez10 closed 2 years ago

arturohernandez10 commented 2 years ago

Describe the bug While testing example code for a stepper motor using 4PWM. I could not get one pin to send the correct signal.

Describe the hardware setup Arduino uno r3

IDE you are using

Tried the Getting started guide? - if applicable I believe I found the bug in the code. I corrected the pin mapping in code. And the problem went away. I submitted pull request https://github.com/simplefoc/Arduino-FOC/pull/182. This bug report is just for the record.

runger1101001 commented 2 years ago

Thank you very much for reporting this!

You are absolutely correct, this is an error I introduced in a recent refactoring of the driver code. There are many motor / MCU combinations we support in SimpleFOC and unfortunately I can't test them all. In particular stepper motors I don't really have test setups for, so thanks very much for finding this!

arturohernandez10 commented 2 years ago

Closing....