Assignment: Introduction to Arduino and Physical Computing
Collaborators:
Description
Use the Arduino to control a light emitting diode and make it blink.
Components Used
Arduino Code
/* * Blink */ int ledPin = 13; void setup(){ pinMode(ledPin, OUTPUT); } void loop(){ digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(200); for(int i = 0; i < 4; i++){ digitalWrite(ledPin, HIGH); delay(300); digitalWrite(ledPin, LOW); delay(100); } digitalWrite(ledPin, HIGH); delay(2000); digitalWrite(ledPin, LOW); delay(600); digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(100); for(int i = 0; i < 10; i++){ digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); delay(75); } }
Image