updated gemma

This commit is contained in:
Martin Donnelly 2018-11-29 17:27:01 +00:00
parent e9c94ebfff
commit c06d3c6f09

View File

@ -39,8 +39,7 @@ const uint32_t clu_purple_yellow[] = { 0xff00ff, 0xff00dd, 0xff00bb, 0xff0099, 0
const uint32_t clu_yellow_green[] = { 0xffff00, 0xeeff00, 0xddff00, 0xccff00, 0xbbff00, 0xaaff00, 0x99ff00, 0x88ff00, 0x77ff00, 0x66ff00, 0x55ff00, 0x44ff00, 0x33ff00, 0x22ff00, 0x11ff00, 0x00ff00 }; const uint32_t clu_yellow_green[] = { 0xffff00, 0xeeff00, 0xddff00, 0xccff00, 0xbbff00, 0xaaff00, 0x99ff00, 0x88ff00, 0x77ff00, 0x66ff00, 0x55ff00, 0x44ff00, 0x33ff00, 0x22ff00, 0x11ff00, 0x00ff00 };
const uint32_t clu_orange_green[] = { 0xff5300, 0xff6f00, 0xff8c00, 0xffa800, 0xffc500, 0xffe100, 0xfffe00, 0xe4ff00, 0xc7ff00, 0xabff00, 0x8eff00, 0x72ff00, 0x55ff00, 0x39ff00, 0x1cff00, 0x00ff00 }; const uint32_t clu_orange_green[] = { 0xff5300, 0xff6f00, 0xff8c00, 0xffa800, 0xffc500, 0xffe100, 0xfffe00, 0xe4ff00, 0xc7ff00, 0xabff00, 0x8eff00, 0x72ff00, 0x55ff00, 0x39ff00, 0x1cff00, 0x00ff00 };
const uint32_t clu[32]; const uint32_t breathe_cols[] = { 0xff0000, 0xffff00, 0x00ffff, 0xff00ff, 0xffffff };
void setup() { void setup() {
pixels.begin(); pixels.begin();
@ -48,23 +47,13 @@ void setup() {
prevTime = millis(); prevTime = millis();
prevChange = millis(); prevChange = millis();
// colourMode = 1;
// initclu();
} }
void initclu() {
memcpy(clu, clu_blue_red, sizeof clu_blue_red );
}
void loop() { void loop() {
uint8_t i; uint8_t i;
uint32_t t; uint32_t t;
uint8_t B; uint8_t B;
switch (mode) { switch (mode) {
case 0: // Random sparks - just one LED on at a time! case 0: // Random sparks - just one LED on at a time!
@ -80,7 +69,7 @@ void loop() {
// color = fire[random(FIRE_SIZE)]; // color = fire[random(FIRE_SIZE)];
// color = lightning[random(LIGHTNING_SIZE)]; // color = lightning[random(LIGHTNING_SIZE)];
color = 0xff0000; color = breathe_cols[colourMode];
pixels.setPixelColor(0, color); pixels.setPixelColor(0, color);
pixels.setBrightness(B); pixels.setBrightness(B);
pixels.show(); pixels.show();
@ -107,8 +96,9 @@ void loop() {
color = clu_red_orange[random(FIRE_SIZE)]; color = clu_red_orange[random(FIRE_SIZE)];
} }
if (colourMode == 4) {
// color = lightning[random(LIGHTNING_SIZE)]; color = lightning[random(FIRE_SIZE)];
}
pixels.setPixelColor(0, color); pixels.setPixelColor(0, color);
@ -134,8 +124,7 @@ void loop() {
switch (mode) { switch (mode) {
case 0: case 0:
waiting = 8000; waiting = 8000;
color = 0xff0000; color = color = breathe_cols[colourMode];
// color = 0x007fff;
break; break;
case 1: case 1:
waiting = 30000; waiting = 30000;
@ -147,10 +136,10 @@ void loop() {
} }
if (mode == 2) { if (mode == 2) {
//++colourMode; ++colourMode;
//if (colourMode > 3) { if (colourMode > 4) {
// colourMode = 0; colourMode = 0;
//} }
} }
//color = rgb[random(3)]; //color = rgb[random(3)];
prevTime = millis(); prevTime = millis();