0
votes

I got a very simple code to run on Arduino. The problem is that when I run the code and open the Serial Monitor then first it shows "Ple" and then adds "Please enter inputs:" which at the end I get "PlePlease enter inputs:" How can I get rid of the "Ple" or make Serial Monitor not to print before I open it.

void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.print("Please enter inputs:\n");
  while(true);
}
2

2 Answers

0
votes

Try to open the serial monitor with the shortcut (ctrl+shift+m). It triggers the reset and restarts your program. I don't know why this happens only using the shortcut. Hope this helps.

0
votes

it's the same for my latest work... in this case it seems that low baudrate could be the problem.

try to bring the baudrate up to 115200 (don't forget to change it also in the down right corner of serial monitor).

Just to be sure, put a small delay (500ms) just before the Serial Print command. Hope this could be useful also for you!

Ciao.