added variable for current brightness

This commit is contained in:
Stefan H. 2018-12-11 21:30:00 +01:00
parent f2497430a2
commit d5e20a932f
2 changed files with 4 additions and 4 deletions

View file

@ -10,7 +10,7 @@
#include <NeoPixelBrightnessBus.h>
#include "defaults.h"
char test[][64] = { { 0, 0, 1, 1, 1, 1, 0, 0,
uint8_t test[][64] = { { 0, 0, 1, 1, 1, 1, 0, 0,
0, 1, 0, 0, 0, 0, 1, 0,
1, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 1, 1, 0, 1,
@ -78,12 +78,11 @@ void setup() {
while (!Serial); // wait for serial attach
Serial.println();
Serial.println("Initializing...");
Serial.flush();
Serial.println("Initializing..."); Serial.flush();
// this resets all the neopixels to an off state
strip.Begin();
strip.SetBrightness(64);
strip.SetBrightness(brightness);
strip.ClearTo(black);
strip.Show();

View file

@ -16,3 +16,4 @@ uint8_t colorMap[] = { 0x00, 0x00, 0x00,
0xaf, 0xaa, 0xb9,
0xf5, 0xf4, 0xeb };
uint8_t brightness = 64;