Tab Content
Tab Title
Instructions
Tab Content
  1. Press the upload button to upload the Blink program to the Arduino board.
     
  2. Notice that the Arduino software says, “Done uploading” in the blue bar at the bottom of the screen.

 

STEM Connections

Coding is essential to the creation of computer programs (APPs, software, etc.) that make tasks happen and machines work. There are two critical steps: writing the code and then uploading the code that has been translated to machine code. In this phase, you are viewing the Blink code on the computer. The code has not yet been translated into machine code or sent to the Arduino board. At this point, the USB cable simply provides power to the Arduino board. The upload button will cause the Arduino software to turn the Blink code into machine code and send the Blink program to the Arduino board. After the upload is complete, the Arduino board carries the instructions contained in the Blink program. Once this code is uploaded, the code lives on the Arduino board and remains there until new code is uploaded. Any changes made to the code on your computer must be uploaded for the change to occur on the Arduino board.

Tab Title
Implementation
Tab Content

Anytime we upload or download, we are transferring information from one device to another. Once we upload the Blink code, the code lives on the Arduino board.  Students are often concerned that they must be connected to their computer in order for the Arduino to work properly, but in fact, we use the computer to upload the code, and then simply to provide power to the Arduino board.

Continue the texting analogy:

  • Ask students: “Once our text is written, what do we do?”  
  • Explain: “We need to hit send for our message to be delivered to the other person.” Likewise, we need to press the upload button to “send” our code to the Arduino board.
Tab Title
Troubleshooting
Tab Content

My screen shows “done compiling”, is that ok?

  1. “done compiling” is not the same as “done uploading”
  2. Be sure to click the upload button, not the compile button.

“error compiling”

  1. Try clicking ‘upload’ again.
  2. If any code was accidentally added or deleted, and you are not sure what happened, press Ctrl+Z to undo what you had previously done.
  3. Close all windows, open the Blink code, upload again.

“problem uploading to board”

  1. Be sure the port is connected to the right COM# (refer to the previous step, Connect the Arduino).
  2. Unplug and re-plug the USB cable (maybe even try a different USB port if available) and upload again.
  3. Disconnect all wires from the Arduino board, unplug and re- plug the USB cable, close all Arduino windows and open Blink code again, upload again.
Instruction Category
Video