Both sides previous revision Previous revision Next revision | Previous revision | ||
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:10] anamaria.martinlopez [Colors:] |
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:22] 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 167: | Line 171: | ||
strip. begin();\\ | strip. begin();\\ | ||
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 182: | Line 186: | ||
delay (500);\\ | delay (500);\\ | ||
strip. setPixelColor(3,034,113,179); // cuarto led\\ | strip. setPixelColor(3,034,113,179); // cuarto led\\ | ||
+ | strip.show();\\ | ||
+ | delay (500); strip. setPixelColor(3,0,0,0); //primer led\\ | ||
strip.show();\\ | strip.show();\\ | ||
delay (500); | delay (500); | ||
- | strip. setPixelColor(3,0,0,0); //primer led\\ | + | \\ |
- | strip.show();\\ | + | |
- | delay (500);\\ | + | |
strip. setPixelColor(2,0,0,0); //segundo led\\ | strip. setPixelColor(2,0,0,0); //segundo led\\ | ||
strip.show();\\ | strip.show();\\ | ||
Line 197: | Line 201: | ||
strip.show();\\ | strip.show();\\ | ||
delay (500);\\ | delay (500);\\ | ||
- | strip.show(); | + | strip.show(); } // |
- | + | ||
- | } | + | |