Tutorial.Blink History

Hide minor edits - Show changes to markup

November 20, 2013, at 11:32 AM by Roberto Guido - corrected reference to Blink.ino
Changed line 29 from:
to:
December 01, 2011, at 04:23 AM by David Cuartielles -
Changed lines 29-31 from:
to:
August 02, 2011, at 08:32 PM by Equipo Traduccion -
Changed lines 7-8 from:

Las placas están diseñadas para que hacer parpadear un LED sea muy fácil usando el pin digital 13. Algunas (como la Diecimila y la LilyPad) tienen el LED directamente incorporado en la placa. En la mayoría de las otras (como en la Mini y la BT), existe una resistencia de 1KB en el pin permitiéndote conectar un LED directamente. (para conectar un LED a otro pin digital, deberías usar una resistencia externa)

to:

Las placas están diseñadas para que hacer parpadear un LED sea muy fácil usando el pin digital 13. Algunas (como la Diecimila y la LilyPad) tienen el LED directamente incorporado en la placa. En la mayoría de las otras (como en la Mini y la BT), existe una resistencia de 1KOhm en el pin permitiéndote conectar un LED directamente. (para conectar un LED a otro pin digital, deberías usar una resistencia externa)

May 31, 2010, at 06:43 PM by Equipo Traduccion - traducciion al espa~ol
Changed lines 3-12 from:

Blink

In most programming languages, the first program you write prints "hello world" to the screen. Since an Arduino board doesn't have a screen, we blink an LED instead.

The boards are designed to make it easy to blink an LED using digital pin 13. Some (like the Diecimila and LilyPad) have the LED built-in to the board. On most others (like the Mini and BT), there is a 1 KB resistor on the pin, allowing you to connect an LED directly. (To connect an LED to another digital pin, you should use an external resistor.)

LEDs have polarity, which means they will only light up if you orient the legs properly. The long leg is typically positive, and should connect to pin 13. The short leg connects to GND; the bulb of the LED will also typically have a flat edge on this side. If the LED doesn't light up, trying reversing the legs (you won't hurt the LED if you plug it in backwards for a short period of time).

Circuit

to:

LED parpadeante

En la mayoría de los lenguajes de programación, el primer programa que tu escribes imprime en la pantalla del ordenador la frase "Hola Mundo". Ya que una placa Arduino no tiene una pantalla, haremos parpadear un LED.

Las placas están diseñadas para que hacer parpadear un LED sea muy fácil usando el pin digital 13. Algunas (como la Diecimila y la LilyPad) tienen el LED directamente incorporado en la placa. En la mayoría de las otras (como en la Mini y la BT), existe una resistencia de 1KB en el pin permitiéndote conectar un LED directamente. (para conectar un LED a otro pin digital, deberías usar una resistencia externa)

Los LEDs tienen polaridad, lo que significa que solo encenderán si los orientas debidamente. Generalmente el terminal mas largo es el positivo y deberá estar conectado al pin 13. El terminal corto debe conectarse con la tierra (GND); adicionalmente el bulbo del LED tiene un borde plano en su extremo. Si el LED no enciende, trata de conectarlo de manera opuesta, intercambiando los terminales de posición (no dañaras el LED si lo conectas en sentido opuesto por un periodo de tiempo corto).

Circuito

Changed lines 15-18 from:

Schematic:

click the image to enlarge

to:

Esquemático:

haz click en la imagen para agrandarla

Changed lines 24-27 from:

Code

The example code is very simple, credits are to be found in the comments.

to:

Código

El código de ejemplo es bastante sencillo, los créditos los encontraras en los comentarios.

February 24, 2010, at 04:16 AM by Tom Igoe -
Changed line 30 from:
to:
February 24, 2010, at 04:16 AM by Tom Igoe -
Changed lines 30-49 from:
 /*
   Blink
  
  Turns on an LED on for one second, then off for one second, repeatedly.
  
  The circuit:
  * LED connected from digital pin 13 to ground.
  
  * Note: On most Arduino boards, there is already an LED on the board
  connected to pin 13, so you don't need any extra components for this example.
  
  
  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
  
  */
to:
Changed lines 32-52 from:
to:
July 05, 2009, at 07:12 PM by Tom Igoe -
Changed line 71 from:
to:
July 05, 2009, at 07:07 PM by Tom Igoe -
Changed lines 28-30 from:

[@ /*

  Blink
to:
Changed line 51 from:
 Turns on an LED on for one second, then off for one second, repeatedly.
to:
 int ledPin =  13;    // LED connected to digital pin 13
Changed lines 53-54 from:
 The circuit:
 * LED connected from digital pin 13 to ground.
to:
 // The setup() method runs once, when the sketch starts
Changed lines 55-56 from:
 * Note: On most Arduino boards, there is already an LED on the board
 connected to pin 13, so you don't need any extra components for this example.
to:
 void setup()   {                
   // initialize the digital pin as an output:
   pinMode(ledPin, OUTPUT);     
 }
Added lines 60-61:
 // the loop() method runs over and over again,
 // as long as the Arduino has power
Changed lines 63-64 from:
 Created 1 June 2005
 By David Cuartielles
to:
 void loop()                     
 {
   digitalWrite(ledPin, HIGH);   // set the LED on
   delay(1000);                  // wait for a second
   digitalWrite(ledPin, LOW);    // set the LED off
   delay(1000);                  // wait for a second
 }
Changed lines 71-97 from:
 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

// The setup() method runs once, when the sketch starts

void setup() {

  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT);     

}

// the loop() method runs over and over again, // as long as the Arduino has power

void loop() {

  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(1000);                  // wait for a second

}

@]

to:
June 25, 2009, at 01:54 PM by Tom Igoe -
June 25, 2009, at 01:54 PM by Tom Igoe -
Changed lines 16-17 from:

click the image to enlarge

to:

click the image to enlarge

June 25, 2009, at 01:53 PM by Tom Igoe -
Changed lines 18-22 from:

to:

June 25, 2009, at 01:52 PM by Tom Igoe -
Changed lines 15-18 from:

Schematic

to:

Schematic: click the image to enlarge

June 25, 2009, at 01:50 PM by Tom Igoe -
Added lines 15-18:

Schematic

June 25, 2009, at 11:27 AM by Tom Igoe -
Changed lines 33-34 from:
 By DojoDave <http://www.0j0.org>
 http://arduino.berlios.de
to:
 By David Cuartielles
Added lines 35-36:
 http://arduino.cc/en/Tutorial/Blink
June 17, 2009, at 11:13 PM by Tom Igoe -
Changed lines 20-32 from:

/* 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
to:

/*

  Blink

 Turns on an LED on for one second, then off for one second, repeatedly.

 The circuit:
 * LED connected from digital pin 13 to ground.

 * Note: On most Arduino boards, there is already an LED on the board
 connected to pin 13, so you don't need any extra components for this example.

 Created 1 June 2005
 By DojoDave <http://www.0j0.org>
 http://arduino.berlios.de

 based on an orginal by H. Barragan for the Wiring i/o board
Changed lines 40-44 from:

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

void setup() {

  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
to:

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

// The setup() method runs once, when the sketch starts

void setup() {

  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT);     
Changed lines 49-52 from:

void loop()

to:

// the loop() method runs over and over again, // as long as the Arduino has power

void loop()

Changed lines 54-57 from:
  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
to:
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(1000);                  // wait for a second
Added line 59:
February 15, 2008, at 11:59 PM by David A. Mellis - clarifying that some boards have built-in leds, others have 1 KB resistor on pin 13
Changed lines 5-10 from:

The first program every programmer learns consists in writing enough code to make their code show the sentence "Hello World!" on a screen.

As a microcontroller, Arduino doesn't have any pre-established output devices. Willing to provide newcomers with some help while debugging programs, we propose the use of one of the board's pins plugging a LED that we will make blink indicating the right functionallity of the program.

We have added a 1K resistor to pin 13, what allows the immediate connection of a LED between that pin and ground.

to:

In most programming languages, the first program you write prints "hello world" to the screen. Since an Arduino board doesn't have a screen, we blink an LED instead.

The boards are designed to make it easy to blink an LED using digital pin 13. Some (like the Diecimila and LilyPad) have the LED built-in to the board. On most others (like the Mini and BT), there is a 1 KB resistor on the pin, allowing you to connect an LED directly. (To connect an LED to another digital pin, you should use an external resistor.)

February 03, 2007, at 03:32 PM by David A. Mellis -
Changed lines 3-4 from:

Blinking LED

to:

Blink

February 03, 2007, at 10:51 AM by David A. Mellis -
Changed lines 3-4 from:

blink

to:

Blinking LED

February 03, 2007, at 10:51 AM by David A. Mellis -
Changed lines 3-4 from:

Blinking LED

to:

blink

January 29, 2007, at 06:39 PM by David A. Mellis -
Changed lines 3-4 from:

Blink

to:

Blinking LED

January 28, 2007, at 12:06 PM by David A. Mellis -
Changed lines 3-4 from:

blink

to:

Blink

Added lines 13-14:

Circuit

Changed lines 17-18 from:

Code

to:

Code

January 28, 2007, at 11:27 AM by David A. Mellis -
Changed line 21 from:
 * -----------
to:
 * ------------
January 28, 2007, at 11:27 AM by David A. Mellis -
Changed line 21 from:
 * ------------
to:
 * -----------
Deleted line 43:
  if (1 & 0) 
January 28, 2007, at 11:27 AM by David A. Mellis -
Changed line 44 from:
  if (1 < 0) 
to:
  if (1 & 0) 
January 28, 2007, at 11:26 AM by David A. Mellis -
Changed line 19 from:

[=

to:

[@

Added line 44:
  if (1 < 0) 
Changed line 50 from:

=]

to:

@]

January 28, 2007, at 11:26 AM by David A. Mellis -
Changed lines 15-19 from:

[@ // blink // <http://www.arduino.cc/en/Tutorial/Blink> int pin = 13;

to:

Code

The example code is very simple, credits are to be found in the comments.

[= /* 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

Changed line 39 from:
  pinMode(pin, OUTPUT);
to:
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
Changed lines 44-47 from:
  digitalWrite(pin, HIGH);
  delay(1000);
  digitalWrite(pin, LOW);
  delay(1000);
to:
  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
Changed line 49 from:

@]

to:

=]

January 28, 2007, at 11:25 AM by David A. Mellis -
Changed lines 5-6 from:

This example blinks the LED on pin 13, turning it on for one second, then off for one second, and so on.

to:

The first program every programmer learns consists in writing enough code to make their code show the sentence "Hello World!" on a screen.

As a microcontroller, Arduino doesn't have any pre-established output devices. Willing to provide newcomers with some help while debugging programs, we propose the use of one of the board's pins plugging a LED that we will make blink indicating the right functionallity of the program.

We have added a 1K resistor to pin 13, what allows the immediate connection of a LED between that pin and ground.

LEDs have polarity, which means they will only light up if you orient the legs properly. The long leg is typically positive, and should connect to pin 13. The short leg connects to GND; the bulb of the LED will also typically have a flat edge on this side. If the LED doesn't light up, trying reversing the legs (you won't hurt the LED if you plug it in backwards for a short period of time).

January 28, 2007, at 11:14 AM by David A. Mellis -
Changed lines 1-2 from:

Examples > Digital I/O

to:

Examples > Digital I/O

Added lines 8-9:

// blink // <http://www.arduino.cc/en/Tutorial/Blink>

January 28, 2007, at 11:03 AM by David A. Mellis -
Changed lines 1-2 from:

Examples > Digital I/O > blink

to:

Examples > Digital I/O

blink

January 28, 2007, at 11:03 AM by David A. Mellis -
Changed lines 1-2 from:

examples > digital > blink

to:

Examples > Digital I/O > blink

January 28, 2007, at 11:02 AM by David A. Mellis -
Added lines 1-4:

examples > digital > blink

This example blinks the LED on pin 13, turning it on for one second, then off for one second, and so on.

January 14, 2007, at 03:24 PM by David A. Mellis -
Added lines 1-16:
int pin = 13;

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

void loop()
{
  digitalWrite(pin, HIGH);
  delay(1000);
  digitalWrite(pin, LOW);
  delay(1000);
}

Share