Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 13:09] anamaria.martinlopez |
fabricademy2017:students:anamaria.martinlopez:week12 [2018/06/20 14:10] anamaria.martinlopez [Colors:] |
||
---|---|---|---|
Line 145: | Line 145: | ||
{{youtube>vC7GrdxOMDg?medium}} | {{youtube>vC7GrdxOMDg?medium}} | ||
+ | |||
+ | ====== Colores: ====== | ||
+ | |||
+ | \\ | ||
+ | Blanco: 244,244,244 \\ | ||
+ | Rosa: 234,137,154 \\ | ||
+ | Verde: 0,250.0 \\ | ||
+ | Azul: 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(); | ||
+ | |||
+ | } | ||