Devices & Components
Arduino Uno Rev3
Jumper wires (generic)
LilyPad Rainbow LED (strip of 7 colors)
Hardware & Tools
Materia 101
Software & Tools
Arduino IDE
Arduino IoT Cloud
Project description
Code
7 COLOR LED
arduino
1int neg = 13; // +LED connected to digital pin 13 2int pos = 12; // -LED connected to digital pin 12 3int crtl = 11; // control coonected to digital pin 11 4 5// The setup() method runs once, when the sketch starts 6 7void setup() { 8 // initialize the digital pin as an output: 9 pinMode(neg, OUTPUT); 10 pinMode(pos, OUTPUT); 11 pinMode(crtl, OUTPUT); 12 digitalWrite(pos, HIGH); // set the LED on 13 digitalWrite(neg, LOW); // set the LED off 14 digitalWrite(crtl,LOW); //ser the crtl off 15 delay(15000); // wait for 15 second 16} 17// the loop() method runs over and over again, 18// as long as the Arduino has power 19 20void loop() 21{ 22digitalWrite(crtl, HIGH); 23delay(250); 24digitalWrite(crtl, LOW); 25delay(250); 26 27 28 29} 30
Downloadable files
7 COLOR LED
7 COLOR LED
7 COLOR LED
7 COLOR LED
7 COLOR LED
7 COLOR LED
Documentation
7 COLOR LED
7 COLOR LED
Comments
Only logged in users can leave comments