I am new to arduino and it seems something is wrong with my serial monitor. I am using the standard sensorapi code for the BNO055 with nothing connected to the arduino nano so it should just print that nothing is found, but instead prints a few random symbols or nothing at all when everything is connected. Why is this happening and how would I go about fixing it?
Hi @carterschlo. The Arduino sketch program that is running on the Arduino board is configured to communicate over the serial port at a specific baud rate. This is done via the Serial.begin function.
For example, if the sketch contains a line like this:
Serial.begin(115200);
then the Serial communication is done at 115200 baud.
The Arduino IDE Serial Monitor must be configured for the same baud rate as set in the sketch program. If it is not, you might see gibberish output in Serial Monitor instead of the expected text, or no text at all.
Check to make sure the selection in the menu at the top right corner of the Serial Monitor panel matches the baud rate in the sketch code. If not, select the correct baud rate and press the reset button on the board to restart the sketch program. Hopefully you will then see the expected output in Serial Monitor.
If things are not working as expected even with the correct Serial Monitor baud rate configuration, please let us know in a reply here and we'll suggest something else you can try.
Edited to Clarify: The bug referenced below does not apply the the Arduino Nano, so it wouldn't explain the behavior observed by the OP. Nonetheless, I am leaving this comment up, in case someone with an affected board (Arduino Uno, Arduino Uno Mini, Arduino Mega) comes across this thread by forum search.
What you're observing could be due to a known bug:
The available work-arounds if you are affected by this bug are to do one of the following:
Insert a 1β2 second delay immediately after the Serial.begin() command in your code.
After uploading your code, quickly press the board's Reset button once.