Assignment: Introduction to Arduino and Physical Computing
Collaborators:
Assignment: Introduction to Arduino and Physical Computing
Collaborators:
Assignment: Introduction to Arduino and Physical Computing
Collaborators:
1. Project Description
: Use the Arduino to control an LED and make it blink in different rate.
2. Components Used
- Arduino
- Green LED
- Resistor
3. Arduino Code
/*
Blinking LED : Turns on an LED on for three second, then off for one second, repeatedly.
The Green LED connected from digital pin 13 to ground, using one resistor.
Created 1 June 2005
By David Cuartielles
http://arduino.cc/en/Tutorial/Blink
based on an orginal by H. Barragan for the Wiring i/o board
*/
int ledPin = 13; // LED connected to digital pin 13
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
delay(3000); // wait for three seconds
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}
4. Picture