Closed 408881465 closed 3 years ago
Hi @408881465
Watchdog timer, what are you trying to make?
can you post pics of your robot in builders.ottodiy.com? Thanks
I woulid like to crontrol OTTO Robot by sending serial port command.
The Wemos D1 mini board is below.
Have your tried using normal arduino nano?
Hi @cparrapa ,
Thanks for your reply.
I have no arduino nano on hand ,so I have not tested it using normal arduino nano.Actually I would like to play OTTO with IOT, so I use Wemos D1 mini. It seems that the Otto.walk() and Otto.playGesture(OttoLove) functions don't feed the watchdog of ESP properly.
BR Tom
Hi @cparrapa
After I added delay(10);
in oscillateServos function, the Soft WDT reset
bugs disappear.
void Otto::oscillateServos(int A[4], int O[4], int T, double phase_diff[4], float cycle=1){
for (int i=0; i<4; i++) {
servo[i].SetO(O[i]);
servo[i].SetA(A[i]);
servo[i].SetT(T);
servo[i].SetPh(phase_diff[i]);
}
double ref=millis();
for (double x=ref; x<=T*cycle+ref; x=millis()){
for (int i=0; i<4; i++){
servo[i].refresh();
}
}
delay(10);
}
I use Wemos D1 mini with my OTTO Robot, sometimes it goes with Soft WDT reset as follows.
My Code is as below:
After I send 'forward' in serial port, exception occurs.
After I send 'OttoLove ' in serial port, exception occurs.
I decoding the stack with Exception Decoder as below.
How to fix this bug.Thanks.