Thursday, January 12, 2012

Arduino | Blink LED Two

I recently acquired an Arduino Uno circuit board which is programmable via USB.  I can flash the circuit with a custom program written in a "C" like programming language.




/*
 * Example Arduino sketch
 */

int ledPinYellow = 10;
int ledPinGreen = 12;

void setup() {                
  pinMode(ledPinYellow, OUTPUT);     
  pinMode(ledPinGreen, OUTPUT);     
}

void loop() {
  digitalWrite(ledPinGreen, LOW);
  digitalWrite(ledPinYellow, HIGH);
  delay(250);
  
  digitalWrite(ledPinYellow, LOW);
  digitalWrite(ledPinGreen, HIGH);
  delay(250);              
}



0 comments:

Post a Comment