When I tried to make a code to help me make a rfid reader, I tested the serial monitor using this code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print(F("Hello World"));
Serial.println();
Serial.end();
}
But in the serial monitor, it shows this: ⸮⸮⸮⸮⸮@⸮⸮⸮⸮⸮
Can you help me find out why?
You're disabling the Serial connection by calling end(), and then never enable it again. Also, is there any particular reason to write the string the flash (The F() )?
Did what you both said but it still is doing the same thing.
Here is the code:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial.print("Hello World");
}
void loop() {
// put your main code here, to run repeatedly:
}
Just did that. (this has been going on for so long you probably think I am faking this, but I'm not)
I re-uploaded the code but now it is showing this error message when I try to upload:
avrdude: ser_send(): write error: Bad file descriptor
avrdude: stk500_send(): failed to send command to serial port
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected