PetoiCamp / OpenCat-Old

A programmable and highly maneuverable robotic cat for STEM education and AI-enhanced services.
https://www.petoi.com
1.36k stars 362 forks source link

Repetitive serial information at boot up #12

Open borntoleave opened 5 years ago

borntoleave commented 5 years ago

The following text is one example output in the serial monitor:

⸮
* Starting *
Initializing I2C
Connecting MPU6050...
Testing connections...
MPU successful
Initializing DMP...
794 148 19 61 
Enabling DMP...
Enabling interrupt detection
DMP ready!
⸮
* Starting *
Initializing I2C
Connecting MPU6050...
Testing connections...
MPU successful
Initializing DMP...
794 148 19 61 
Enabling DMP...
Enabling interrupt detection
DMP ready!

I'm not sure where the ⸮ symbol comes from. And the sketch may start twice at the beginning. Any ideas? Maybe it's related to the timing around Serial.begin(). That's why I'm having Serial.setTimeout(5); or while (Serial.available() && Serial.read()); for clearing the serial buffer. But the "⸮" and duplicated/reboot information still appear.

Any ideas?

dahchael commented 5 years ago

?

Sent from my iPad

On 23 Apr 2019, at 10:42 am, Rongzhong Li notifications@github.com wrote:

The following text is one example output in the serial monitor:

  • Starting * Initializing I2C Connecting MPU6050... Testing connections... MPU successful Initializing DMP... 794 148 19 61 Enabling DMP... Enabling interrupt detection DMP ready! ⸮
  • Starting * Initializing I2C Connecting MPU6050... Testing connections... MPU successful Initializing DMP... 794 148 19 61 Enabling DMP... Enabling interrupt detection DMP ready! I'm not sure where the ⸮ symbol comes from. And the sketch may start twice at the beginning. Any ideas? Maybe it's related to the timing around Serial.begin(). That's why I'm having Serial.setTimeout(5); or while (Serial.available() && Serial.read()); for clearing the serial buffer. But the "⸮" and duplicated/reboot information still appear.

Any ideas?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

kaiaeberli commented 3 years ago

Maybe it is to do with the baud rate of the Serial.begin() and Serial monitor not being the same? See: https://forum.arduino.cc/index.php?topic=528920.0.