January 9, 2015

LED Blink

This is the very first project of every Arduino owner... make a LED blink.


Hardware

  • Arduino Board
  • LED
  • 220 Ohm resistor

Schematic



Circuit



Code


int pinLed = 13;

void setup() {                
  pinMode(led, OUTPUT);     
}

void loop() {
  digitalWrite(pinLed, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                  // wait for a second
  digitalWrite(pinLed, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                  // wait for a second
}

References

Arduino Blink example
Instructables tutorial

https://www.sparkfun.com/tutorials/219

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.