Library is very slow
If you have a robot, use for example, the following code while driving:
leftMotor.setmotor(_CCW, 0); rightMotor.setmotor(_CCW, 0);
The robot will turn the left wheel off first, then delay, and then the right wheel, causing the robot to turn 10-20 degrees left.
This is caused by https://github.com/wemos/WEMOS_Motor_Shield_Arduino_Library/blob/3497cb382ccd724cd2b5c165ad996611e28666f8/src/WEMOS_Motor.cpp#L114 Is there a reason that this delay is here? Whatever the reason is, blocking the entire code for 100 ms is not the solution. I highly recommend removing the delay, it is not appropriate. If there are I²C problems, these must be solved in a different way than this.
Have you tryed to run without it?
I have, and it works, but I would like to see this addressed in the right library.
#5
Might be smart to let a yield(); take the place.
I removed delays
and controll my PS4 BT remote robot in this manner
if(millis()- TmStmpMtrCtrlOld >10){ M_R->setmotor( _CW, oldR2Value>0? (oldR2Value/3+15):0); M_L->setmotor( _CW, oldL2Value>0? (oldL2Value/3+15):0); TmStmpMtrCtrlOld=millis(); }