From d5e20a932f38430e4e0556f4a9a8dc2124ae54cb Mon Sep 17 00:00:00 2001 From: Stefan Heinrichsen Date: Tue, 11 Dec 2018 21:30:00 +0100 Subject: [PATCH] added variable for current brightness --- UNHB-Esel/UNHB-Esel.ino | 7 +++---- UNHB-Esel/defaults.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UNHB-Esel/UNHB-Esel.ino b/UNHB-Esel/UNHB-Esel.ino index a8f350d..a7fc028 100644 --- a/UNHB-Esel/UNHB-Esel.ino +++ b/UNHB-Esel/UNHB-Esel.ino @@ -10,7 +10,7 @@ #include #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(); diff --git a/UNHB-Esel/defaults.h b/UNHB-Esel/defaults.h index c26ccc2..fafe715 100644 --- a/UNHB-Esel/defaults.h +++ b/UNHB-Esel/defaults.h @@ -16,3 +16,4 @@ uint8_t colorMap[] = { 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xb9, 0xf5, 0xf4, 0xeb }; +uint8_t brightness = 64;