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 14:10]
anamaria.martinlopez [Colors:]
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:16]
anamaria.martinlopez
Line 146: Line 146:
 {{youtube>​vC7GrdxOMDg?​medium}} {{youtube>​vC7GrdxOMDg?​medium}}
  
-====== ​Colores: ======+====== ​Colors: ======
  
-\\ +White: 244,​244,​244 
-Blanco: 244,​244,​244 ​\\ + 
-Rosa: 234,​137,​154 ​\\ +Pink: 234,​137,​154 
-Verde: 0,250.0 \\ + 
-Azul: 034,113,179+Green: 0.250.0 
 + 
 +Blue: 034,113,179 
 + 
 +----
  
 include <​Adafruit_NeoPixel.h>​ include <​Adafruit_NeoPixel.h>​
Line 158: Line 162:
 \\ \\
 #define NUM_LEDS 4 // Number of NeoPixels\\ #define NUM_LEDS 4 // Number of NeoPixels\\
-#define PIN 1 // DIGITAL pin # where NeoPixels are connected\\ +#define PIN 1 //DIGITAL pin # where NeoPixels are connected\\ 
-// IMPORTANT: Avoid connecting on a live circuit. . .\\ +//​IMPORTANT:​ Avoid connecting on a live circuit. . .// \\ 
-// if you must, connect GND first.\\+if you must, connect GND first.\\
 Adafruit_NeoPixel strip = Adafruit_NeoPixel( NUM_LEDS, PIN) ; Adafruit_NeoPixel strip = Adafruit_NeoPixel( NUM_LEDS, PIN) ;
  
Line 168: Line 172:
 strip. setBrightness(100);​ // 100/255 brightness ( about 40%) //brillo de 0 a 255\\ strip. setBrightness(100);​ // 100/255 brightness ( about 40%) //brillo de 0 a 255\\
 strip. show(); // Initialize all pixels to ' off'\\ strip. show(); // Initialize all pixels to ' off'\\
-} +} void loop( ) {\\
- +
-void loop( ) {\\+
 delay (500);\\ delay (500);\\
 strip. setPixelColor(0,​244,​244,​244);​ //primer led\\ strip. setPixelColor(0,​244,​244,​244);​ //primer led\\
Line 183: Line 185:
 strip. setPixelColor(3,​034,​113,​179);​ // cuarto led\\ strip. setPixelColor(3,​034,​113,​179);​ // cuarto led\\
 strip.show();​\\ strip.show();​\\
-delay (500); +delay (500); strip. setPixelColor(3,​0,​0,​0);​ //primer led\\
- +
-strip. setPixelColor(3,​0,​0,​0);​ //primer led\\+
 strip.show();​\\ strip.show();​\\
 delay (500);\\ delay (500);\\
Line 197: Line 197:
 strip.show();​\\ strip.show();​\\
 delay (500);\\ delay (500);\\
-strip.show();​ +strip.show();​ } //
- +
-}+