#include <FastLED.h>
#define LED_PIN 8
#define NUM_LEDS 88
CRGB led[NUM_LEDS];
CRGB green =(0,255,0);
CRGB red =(255,0,0);
CRGB blue =(0,0,255);
CRGB orange =(255,50,0);
CRGB pink =(255,50,80);
CRGB yellow =(255,255,0);
CRGB white =(10,10,10);
CRGB off =(0,0,0);
int codeGen = 0;
//-------------------------------------------------------------------------------------------------------
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(led, NUM_LEDS);
pinMode(0,INPUT_PULLUP);
pinMode(1,INPUT_PULLUP);
pinMode(2,INPUT_PULLUP);
pinMode(3,INPUT_PULLUP);
pinMode(4,INPUT_PULLUP);
pinMode(5,INPUT_PULLUP);
pinMode(6,INPUT_PULLUP);
pinMode(7,INPUT_PULLUP);
pinMode(9,OUTPUT);
Serial.begin(9600);
}
//-------------------------------------------------------------------------------------------------------
void loop() {
CRGB codeColors[] = {green, red, blue, orange, pink, yellow};
CRGB code[] = {};
for(int i=0; i < 4; i++){
codeGen = random(0,6);
Serial.println(codeColors[codeGen]);
delay(200);
}
}
#include <FastLED.h>
#define LED_PIN 8
#define NUM_LEDS 88
CRGB led[NUM_LEDS];
CRGB green =(0,255,0);
CRGB red =(255,0,0);
CRGB blue =(0,0,255);
CRGB orange =(255,50,0);
CRGB pink =(255,50,80);
CRGB yellow =(255,255,0);
CRGB white =(10,10,10);
CRGB off =(0,0,0);
int codeGen = 0;
//-------------------------------------------------------------------------------------------------------
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(led, NUM_LEDS);
pinMode(0,INPUT_PULLUP);
pinMode(1,INPUT_PULLUP);
pinMode(2,INPUT_PULLUP);
pinMode(3,INPUT_PULLUP);
pinMode(4,INPUT_PULLUP);
pinMode(5,INPUT_PULLUP);
pinMode(6,INPUT_PULLUP);
pinMode(7,INPUT_PULLUP);
pinMode(9,OUTPUT);
Serial.begin(9600);
}
//-------------------------------------------------------------------------------------------------------
void loop() {
CRGB codeColors[] = {green, red, blue, orange, pink, yellow};
CRGB code[] = {};
for(int i=0; i < 4; i++){
codeGen = random(0,6);
Serial.println(codeColors[codeGen]);
delay(200);
}
}