I have an ARD 2560, which I plan to use as an intelligent motor controller It shall control 2 DC -24 Volts motors, which shall run both ways (clockwise and anti-clockwise). It should have a programmable duty-cycle (0- 100 %) and it should be made so the “motor-run” will only be one (1) PWM-Cycle.
The choice f motor, direction (clockwise or anti-clockwise), the duty-cycle (0-100 %) and the “RUN” command is planned to as a commasepareted command line.
M1,R,10,R : Motor1, Clockwise (right), 10 % dutycycle , and RUN command
M2,L,20,R : Motor1, ANti-Clockwise (Left), 20 % dutycycle , and RUN command
I think a base frequency of 10 KHz will be appropriate.
So when i write M1,R, 10,R my plan was that the ARD-256 first analyzed the input-line, parsed it, and did the command according to the specifided sub-commands. (ignoring eventually any spaces (blanks)).
(After several attempts to make it run on an 328 I finally made it yesterday. But to improve the design to 2 motors, both ways (clockwise or anti-clockwise), variable dutycycles, and reading the commands from the serial-port (PC), analysing the command line , I have ( to be honest) absolute no idea how to do the it and thereby finishing the project.
Can anybody help ??
Thanks in advance.
Kris AKA Snestrup2016