Devices & Components
Arduino Uno Rev3
Jumper wires (generic)
LED (generic)
Resistor 100 ohm
Project description
Code
Let there be Lights
arduino
This code "Let there be Lights" is the iHackLab equivalent of "Hello World".
1 /* 2 This project turns On all the LEDs once at the same time 3 */ 4 5// Setup pins 4 to 12 6void setup() 7{ 8 pinMode(4, OUTPUT); 9 pinMode(5, OUTPUT); 10 pinMode(6, OUTPUT); 11 pinMode(7, OUTPUT); 12 pinMode(8, OUTPUT); 13 pinMode(9, OUTPUT); 14 pinMode(10, OUTPUT); 15 pinMode(11, OUTPUT); 16 pinMode(12, OUTPUT); 17} 18 19// Turn on all LEDs once 20void loop() 21{ 22 digitalWrite(4, HIGH); // switch on pin 4 23 digitalWrite(5, HIGH); // switch on pin 5 24 digitalWrite(6, HIGH); // switch on pin 6 25 digitalWrite(7, HIGH); // switch on pin 7 26 digitalWrite(8, HIGH); // switch on pin 8 27 digitalWrite(9, HIGH); // switch on pin 9 28 digitalWrite(10, HIGH); // switch on pin 10 29 digitalWrite(11, HIGH); // switch on pin 11 30 digitalWrite(12, HIGH); // switch on pin 12 31} 32 33 34 35 36 37// This project is part of the ihacklab Manual 38// Copies are welcome to be shared or distributed publicly 39// as long proper citations are observed. 40// Please cite as follows: 41// Biotronics: The Silver Species, Joey Lawsin, 1988, USA. 42
Let there be Lights
arduino
This code "Let there be Lights" is the iHackLab equivalent of "Hello World".
1 /* 2 This project turns On all the LEDs once at the same time 3 4 */ 5 6// Setup pins 4 to 12 7void setup() 8{ 9 pinMode(4, OUTPUT); 10 11 pinMode(5, OUTPUT); 12 pinMode(6, OUTPUT); 13 pinMode(7, OUTPUT); 14 pinMode(8, 15 OUTPUT); 16 pinMode(9, OUTPUT); 17 pinMode(10, OUTPUT); 18 pinMode(11, OUTPUT); 19 20 pinMode(12, OUTPUT); 21} 22 23// Turn on all LEDs once 24void loop() 25{ 26 27 digitalWrite(4, HIGH); // switch on pin 4 28 digitalWrite(5, HIGH); 29 // switch on pin 5 30 digitalWrite(6, HIGH); // switch on 31 pin 6 32 digitalWrite(7, HIGH); // switch on pin 7 33 digitalWrite(8, 34 HIGH); // switch on pin 8 35 digitalWrite(9, HIGH); // switch 36 on pin 9 37 digitalWrite(10, HIGH); // switch on pin 10 38 digitalWrite(11, 39 HIGH); // switch on pin 11 40 digitalWrite(12, HIGH); // switch 41 on pin 12 42} 43 44 45 46 47 48// This project is part of the ihacklab Manual 49// 50 Copies are welcome to be shared or distributed publicly 51// as long proper citations 52 are observed. 53// Please cite as follows: 54// Biotronics: The Silver Species, 55 Joey Lawsin, 1988, USA. 56
Downloadable files
Schematic Diagram
Schematic Diagram

Schematic Diagram
Schematic Diagram

Block Diagram
Block Diagram

Comments
Only logged in users can leave comments