- Press the arrow button in the top left corner of the Arduino window to upload this code to the Arduino board.
- The message at the bottom of the Arduino window should read “Done Uploading” or shows an error message.
Circulate the room to ensure that all students can upload the code to their Arduino.
- “done compiling” is not the same as “done uploading”
- Make sure that you are clicking on the “upload” button and not the “compile” button.
- “expected declaration before '}' token
- You have too many brackets in the code. Make sure every closed bracket corresponds to an open bracket.
- “expected '}' at end of input”
- You are missing a bracket in the code. Make sure every open bracket corresponds to a closed bracket.
- “expected ‘ ) ‘ before ‘;’ token
- Notice that the Arduino software highlights the area with the problem.
- You might be missing a parenthesis. Make sure every parenthesis has its match.
- “expected ‘;’ before ‘_______’ ”
- Notice that the Arduino software highlights the area with the problem.
- You might be missing a ‘;’ at the end of a line of code. Make sure each line has a ‘;’ after it.
- “error compiling”
- Click ‘upload’ again.
- Double check the code. Make sure everything is included from the code demonstrated in the earlier steps.
- “problem uploading to board”
- Make sure that the Arduino board is connected to the computer with the USB cable.
- Make sure that the Arduino is connected to the right COM port, then upload again.
- To check, go to Tools > Port and see if “COM# (Arduino/Genuino Uno)” is next to the word “Port”.
- If not, select the option mentioned above.
- If no COM# shows “(Arduino/Genuino Uno)” next to it, make sure that the USB cable is connected to both the Arduino board and the USB port of the computer.
- Unplug and re-plug the USB cable and upload again.
- Disconnect all wires from the Arduino board and upload again.
- The Arduino software asks to save before uploading
- To deactivate this option, go to File > Preferences and uncheck the "save when verifying or uploading" option.