- Press the upload button to upload the Servo program to the Arduino board.
STEM Connections
The upload button translates the code into a program and sends that program to the Arduino board. Immediately after the Arduino board receives this program it begins running it. Once the Servos are plugged in properly, the program’s effect on the Servos will be visible.
Circulate the room and help any students who are having issues uploading code. For further troubleshooting help, use the Troubleshooting document. A good way to see who has uploaded and who has errors is to have students give a thumbs up if they get the “Done Uploading” message and raise their hand if they get an error message. Failure to upload properly during this step will prohibit the Servos from working properly in the following steps.
“done compiling” is not the same as “done uploading”
- Be sure to click the “upload” button, not the “compile” button.
“expected ‘ ) ‘ before ‘;’ token
- Notice it highlights the area where there is a problem.
- There is a missing parenthesis somewhere; make sure every parenthesis has its match.
“expected ‘;’ before ‘delay’"
- Notice that the Arduino software highlights the area where there is a problem.
- There is a missing ‘;’ after a line of code. Check that each line has a ‘;’ after it.
“error compiling”
- Try clicking ‘upload’ again.
- Double-check the code to make sure everything is included from the code demonstrated in the earlier steps.
“problem uploading to board”
- Check the most obvious first, that the Arduino board is connected to the computer with the USB cable.
- Check that the Arduino is connected to the right COM port, then upload it 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.
- If more than 1 COM# shows up, choose the larger #.
- Try unplugging and re-plugging the USB cable and uploading it again.
- Try disconnecting all wires from the Arduino board and uploading it 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.