JamesNewton / Arduino_Dynamixel_Stepper_Controller

USB adapter to Arduino with Dynamixel Shield provides simple digital IO and motion.
1 stars 0 forks source link

Set delay directly from n, not p #1

Open JamesNewton opened 3 years ago

JamesNewton commented 3 years ago

As written, if you set p and n, e.g. with 5,120A to put a PWM value of 120 on pin 5, then issue a 0D, the delay will actually be set to 5 us. Probably should move handling of 'D' out of the case and up in the loop just before the if (0==n) {n=p; } and manage with if ('D'==cmd) {d = n; n=0; continue;}

But test that really well if you do it.