-
Notifications
You must be signed in to change notification settings - Fork 5
LED_Lesson
Angelo edited this page Sep 21, 2016
·
3 revisions
Starting from a simple LED, this lesson gives the very basic introduction about Arduino.
JJWfYfD_-Ww Part List ---------- DFRduio Duemilanove or Compatible Arduino Controller (1 unit)
- Green/Red/Yellow LED (1 unit)
- Resistor-220 ohm (1 unit)
- Prototyping Shield (1 unit)
- Mini Breadboard (1 unit)
- Jumper Cables (2 units)
//For Arduino Start kit
//Compatible with all Arduino version
//Last updated 2010-12-1
//www.dfrobot.com
int ledPin=8; //Connect led to Digital Pin 8
void setup()
{
pinMode(ledPin,OUTPUT);//Set ledPin as output
}
void loop()
{
digitalWrite(ledPin,HIGH); //Pull ledPin to high
delay(1000); //Delay 1 second
digitalWrite(ledPin,LOW); //Pull ledPin to low
delay(1000); //Delay 1 second
}