Tutorial-0007.DigitalWrite History

Hide minor edits - Show changes to markup

November 18, 2006, at 07:02 PM by David A. Mellis -
Deleted lines 2-3:

Full tutorial: Blinking LED

Changed lines 34-36 from:
 =]
to:
 =]

Full tutorial: Blinking LED

November 18, 2006, at 03:22 PM by David A. Mellis -
Changed lines 1-4 from:

Blinking LED

Tutorial

to:

Blinking LED: Circuit and Sketch

Full tutorial: Blinking LED

November 18, 2006, at 03:21 PM by David A. Mellis -
Added lines 1-4:

Blinking LED

Tutorial

November 18, 2006, at 03:20 PM by David A. Mellis -
Deleted line 9:
Changed lines 18-19 from:

int ledPin = 13; // LED connected to digital pin 13

to:

int ledPin = 13; // LED connected to digital pin 13

November 18, 2006, at 03:20 PM by David A. Mellis -
Changed lines 9-10 from:
 * board because it has a resistor attached to it, needing only an LED
to:
 * board because it an LED built-in
November 18, 2006, at 03:16 PM by David A. Mellis -
Changed lines 1-2 from:
to:
November 18, 2006, at 01:41 PM by David A. Mellis -
Added lines 1-32:
 
/* Blinking LED
 * ------------
 *
 * turns on and off a light emitting diode(LED) connected to a digital  
 * pin, in intervals of 2 seconds. Ideally we use pin 13 on the Arduino 
 * board because it has a resistor attached to it, needing only an LED

 *
 * Created 1 June 2005
 * copyleft 2005 DojoDave <http://www.0j0.org>
 * http://arduino.berlios.de
 *
 * 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);      // sets the digital pin as output
}

void loop()
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}
 

Share