Uploading error?
I'm unsure why I get this error when I try to upload a code, in which the Uno and a MP3 player module are used. This is what I get when I upload the code:
Sketch uses 4412 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 391 bytes (19%) of dynamic memory, leaving 1657 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Failed uploading: uploading error: exit status 1
20 Replies
are you using pins 0 & 1 on an Uno?
Oh sorry I posterd in the wrong area
yes
you want to use
SoftwareSerial
to talk to the DFMini
pins 0 & 1 are used to upload codeyes
So I can't use pins 1 and 0 if I want to upload code?
correct
or use the Serial Monitor
So why are the pins there?
sorry sounds silly
they are used to upload and to "talk" to the serial monitor
advanced users can use them, but you need to disconnect anything before uploading
this adds a serial port that you can use for the MP3 player
https://docs.arduino.cc/learn/built-in-libraries/software-serial/
Okay so I unplug it when I want to upload then replug it when I want the code to actually work
try it, does it upload once you remove the wires?
Okay will do
don't use any
Serial.prints
Okay.
even when I unplug tx an rx
wow works like magic
pins 0 & 1 are the hardware serial port and are used often in Arduino code. if you add a second "software serial" port it won't interfere
Sorry what do you mean by software serial port? do you mean serial print?
https://discordapp.com/channels/420594746990526466/1394022279968456754/1394023659445948567
it's like adding "another pins 0 & 1", a second serial port
Oh okay I see
Thanks so much, you REALLY know your stuff!
a board like the Mega has more than one serial port, but an Uno has just one
so in general, on an Uno, don't use pins 0 & 1 🙂
ahh, so intresting 🙂
Yep, lesson learnt 🤣
if you still have questions please do open a thread in #coding-help , this channel is more for official product issues
Okay, thanks, will do.