Saturday, April 2, 2011

Upload Your First Sketch

Posted by rinson

Now that you have installed the drivers and the IDE and you have the correct board and ports selected,it’s time to upload an example sketch to the Arduino to test that everything is working properly before
moving on to the first project.
First, click the File menu (Figure 1-10) and then click Examples.

Next, click the Upload button (sixth button from the left) and look at your Arduino. (If you have anArduino Mini, NG, or other board, you may need to press the reset button on the board prior to pressingthe Upload button.) The RX and TX lights should start to flash to show that data is being transmittedfrom your computer to the board. Once the sketch has successfully uploaded, the words “Doneuploading” will appear in the IDE status bar and the RX and TX lights will stop flashingAfter a few seconds, you should see the Pin 13 LED (the tiny LED next to the RX and TX LEDs) start

to flash on and off at one second intervals. If it does, you have just successfully connected your Arduino,installed the drivers and software, and uploaded an example sketch. The Blink sketch is a very simplesketch that blinks LED 13 shown in Figure 1-12, the tiny green (or orange) LED soldered to the board(and also connected to Digital Pin 13 from the microcontroller).Before you move onto Project 1, let’s take a look at the Arduino IDE. I’ll explain each part of the