mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Committing individual examples instead of one .zip
This commit is contained in:
28
build/shared/dist/examples/led_blink/led_blink.pde
vendored
Normal file
28
build/shared/dist/examples/led_blink/led_blink.pde
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/* 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
|
||||
}
|
Reference in New Issue
Block a user