Access the Internet – In order to use your Arduino, you will first need to download Arduino software from the internet (it is free!). This software, known as the Arduino Integrated Development Environment (IDE), allows us to program the Arduino to do what we want. It is called integrated because we can write the code, compile and execute it from the same program window. You can download the latest or a previous version of the software from Arduino.cc, the repository for Arduino development. We can also code online using Arduino Web Editor, with the code stored on the cloud: http://arduino.cc/en/Main/Software.
Visit: http://arduino.cc/en/Guide/HomePage
.Download & install the Arduino environment (IDE)
Connect the board to your computer via the USB cable
If needed, install the drivers (not needed in the lab)
Launch the Arduino IDE
Select your board
Select your serial port
Open the blink example
Upload the program
LED Resistor Circuit: The LED’s legs are connected to two pins on the Arduino: ground and pin 13. The component between the LED and pin 13 is a resistor, which helps limit the current to prevent the LED from burning itself out.
Blink Arduino Code: When the code editor is open, you can click the drop-down menu on the left and select "Blocks + Text" to reveal the Arduino code generated by the code blocks. All the extra symbols are a part of Arduino’s syntax but don’t get intimidated. Writing the code from scratch will take time and practice.
/*
This program blinks pin 13 of the Arduino (the
built-in LED)
*/
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(13, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
// turn the LED off by making the voltage LOW
digitalWrite(13, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}