Closed fecavy closed 5 years ago
Thanks for reporting and sorry for missing this report for such a long time.
This: https://github.com/harbaum/ftduino/commit/d64f912a79ee825f211818f23c034f6f1580f609 should fix the issue.
It will be part of the next release.
Controlling M1 is no problem, but M2, M3 and M4 don't work.
According to the manual, the following code should set M2 to turn right at 100% speed, but instead the motor attached at M3 starts to rotate.
I modified I2CSlave a little bit to track the issue down in the code: I2cSlaveDebug2.ino.txt
It produces the following (slightly modified) output explaining the bug's origin:
Looks like the motor port is not calculated correctly. Port 2 can be
Ftduino::O3
(that works), but alsoFtduino::M2
.Motor ports would require to be shifted 1 to the right to calculate them correctly:
If I wasn't unsure of breaking the set-output commands, I would file a pull request...