Devices & Components
Arduino Uno Rev3
5 mm LED: Red
USB-A to B Cable
Resistor 220 ohm
Software & Tools
Arduino IDE
Project description
Code
LED by Alex Glow
c_cpp
1/* 2 Blink 3 Turns on an LED on for one second, then off for one second, repeatedly. 4 5 Most Arduinos have an on-board LED you can control. On the Uno and 6 Leonardo, it is attached to digital pin 13. If you're unsure what 7 pin the on-board LED is connected to on your Arduino model, check 8 the documentation at http://www.arduino.cc 9 10 This example code is in the public domain. 11 12 modified 8 May 2014 13 by Scott Fitzgerald 14 */ 15 16 17// the setup function runs once when you press reset or power the board 18void setup() { 19 // initialize digital pin 13 as an output. 20 pinMode(13, OUTPUT); 21} 22 23// the loop function runs over and over again forever 24void loop() { 25 digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) 26 delay(1000); // wait for a second 27 digitalWrite(13, LOW); // turn the LED off by making the voltage LOW 28 delay(1000); // wait for a second 29} 30
LED by Alex Glow
c_cpp
1/* 2 Blink 3 Turns on an LED on for one second, then off for one 4 second, repeatedly. 5 6 Most Arduinos have an on-board LED you can control. 7 On the Uno and 8 Leonardo, it is attached to digital pin 13. If you're unsure 9 what 10 pin the on-board LED is connected to on your Arduino model, check 11 12 the documentation at http://www.arduino.cc 13 14 This example code is in the 15 public domain. 16 17 modified 8 May 2014 18 by Scott Fitzgerald 19 */ 20 21 22// 23 the setup function runs once when you press reset or power the board 24void setup() 25 { 26 // initialize digital pin 13 as an output. 27 pinMode(13, OUTPUT); 28} 29 30// 31 the loop function runs over and over again forever 32void loop() { 33 digitalWrite(13, 34 HIGH); // turn the LED on (HIGH is the voltage level) 35 delay(1000); // 36 wait for a second 37 digitalWrite(13, LOW); // turn the LED off by making the 38 voltage LOW 39 delay(1000); // wait for a second 40} 41
Downloadable files
LED by ledlights123456789
wiring
LED by ledlights123456789

Comments
Only logged in users can leave comments