Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We are allowed to use the TX and RX pins as general purpose inputs or outputs (GPIO), which are pins 0 and 1 on the Arduino Uno. However, these pins are primarily intended for serial communication, and are in use when uploading to the board, or communicating with the serial port. So, avoid using them unless you really need to use every single GPIO pin on the board (perhaps you could consider a shift register instead)


Serial port in use when uploading

While trying to upload code to the Arduino, the serial port can’t be used for anything else. The Arduino IDE will automatically close the serial monitor if it's in use, but you might have another application trying to use the same port as the Arduino, for example, a processing or p5js sketch that interfaces with your Arduino.

Reset button before uploading the code

Some Arduino-based boards will like to be reset immediately before uploading to the board. Check the particular model online for advice on how to use the reset button.

You can also run into trouble uploading if the code is using the serial port heavily. With some trial and error, pressing the reset button at just the right moment before uploading can solve the problem.

Programming Errors

A missing semicolon at the end of a statement

...