Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 13:17]
anamaria.martinlopez
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:16]
anamaria.martinlopez
Line 148: Line 148:
 ====== Colors: ====== ====== Colors: ======
  
-\\ +White: 244,244,244 
-White: 244,244,244\\ + 
-Pink: 234,137,154\\ +Pink: 234,137,154 
-Green: 0.250.0\\+ 
 +Green: 0.250.0 
 Blue: 034,113,179 Blue: 034,113,179
 +
 +----
 +
 +include <​Adafruit_NeoPixel.h>​
 +
 +\\
 +#define NUM_LEDS 4 // Number of NeoPixels\\
 +#define PIN 1 //DIGITAL pin # where NeoPixels are connected\\
 +//​IMPORTANT:​ Avoid connecting on a live circuit. . .// \\
 +if you must, connect GND first.\\
 +Adafruit_NeoPixel strip = Adafruit_NeoPixel( NUM_LEDS, PIN) ;
 +
 +\\
 +void setup() {\\
 +strip. begin();\\
 +strip. setBrightness(100);​ // 100/255 brightness ( about 40%) //brillo de 0 a 255\\
 +strip. show(); // Initialize all pixels to ' off'\\
 +} void loop( ) {\\
 +delay (500);\\
 +strip. setPixelColor(0,​244,​244,​244);​ //primer led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(1,​234,​137,​154);​ //segundo led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(2,​0,​250,​0);​ //tercer led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(3,​034,​113,​179);​ // cuarto led\\
 +strip.show();​\\
 +delay (500); strip. setPixelColor(3,​0,​0,​0);​ //primer led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(2,​0,​0,​0);​ //segundo led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(1,​0,​0,​0);​ //tercer led\\
 +strip.show();​\\
 +delay (500);\\
 +strip. setPixelColor(0,​0,​0,​0);​ // cuarto led\\
 +strip.show();​\\
 +delay (500);\\
 +strip.show();​ } //