-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
First the code didn't build until I included Wire.h then I couldn't get the code to run on my wemos d1, It simply restarted again and again showing rst cause:2, boot mode:(3,7)
First after I added wire.h and changed the code to use pointers and called the Motor constructor from setup(), it worked.
include <Wire.h>
...
Motor *M1 = NULL;
Motor *M2 = NULL;
void setup() {
delay(1000);
Serial.begin(115200);
M1 = new Motor(0x30,_MOTOR_A, 1000);//Motor A
M2 = new Motor(0x30,_MOTOR_B, 1000);//Motor B
}
void loop() {
for (pwm = 0; pwm <= 100; pwm++)
{
M1->setmotor( _CW, pwm);
...etc..
Hopefully it helps someone.
BenoitWickramarachi and oleglyanoleglyanoleglyan
Metadata
Metadata
Assignees
Labels
No labels