Uploading code to Arduino

It's time to power on the Arduino board and make it do something. In this recipe, we will connect the Arduino to the computer and upload an example sketch from the Arduino IDE.

Getting ready

To execute this recipe, the following are the components required:

  • A computer with the Arduino IDE installed
  • An Arduino board connected to the computer via USB

How to do it…

Follow these steps:

  1. Connect the Arduino to the computer using a USB cable. If everything is properly connected, the green LED light will turn on.
  2. If this is the first time the Arduino has been connected to the computer, driver installation might be required. Please follow the Connecting Arduino recipe to properly set up the Arduino board.
  3. Start the Arduino IDE and, in ...

Get Arduino Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.