From 9507532fa1d74bd76fc1158be213f894e81db46a Mon Sep 17 00:00:00 2001 From: Stefan Heinrichsen Date: Thu, 29 Feb 2024 21:42:20 +0100 Subject: [PATCH] Adjustments for my setup --- .../ClockSketch_v7-7SCv3-TFO-3.ino | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/ClockSketch_v7-7SCv3-TFO-3/ClockSketch_v7-7SCv3-TFO-3.ino b/ClockSketch_v7-7SCv3-TFO-3/ClockSketch_v7-7SCv3-TFO-3.ino index a60394e..eba07d9 100644 --- a/ClockSketch_v7-7SCv3-TFO-3/ClockSketch_v7-7SCv3-TFO-3.ino +++ b/ClockSketch_v7-7SCv3-TFO-3/ClockSketch_v7-7SCv3-TFO-3.ino @@ -40,7 +40,7 @@ #define AUTODST // FADING - uncomment to enable fading effects for dots/digits, other parameters further down below -// #define FADING +#define FADING // autoBrightness - uncomment to enable automatic brightness adjustments by using a photoresistor/LDR // #define AUTOBRIGHTNESS @@ -101,8 +101,8 @@ RtcDS3231 Rtc(Wire); /* Start WiFi config/parameters------------------------------------------------------------------------- */ #ifdef USEWIFI const bool useWPS = false; // set to false to disable WPS and use credentials below -const char *wifiSSID = "maWhyFhy"; -const char *wifiPWD = "5up3r1337r0xX0r!"; +const char *wifiSSID = "unhb.de"; +const char *wifiPWD = "sagichnicht"; #endif /* End WiFi config/parameters--------------------------------------------------------------------------- */ @@ -128,12 +128,12 @@ const char *wifiPWD = "5up3r1337r0xX0r!"; TimeChangeRule *tcr; //----------------------------------------------- /* US */ -TimeChangeRule tcr1 = {"tcr1", First, Sun, Nov, 2, -300}; // utc -5h, valid from first sunday of november at 2am -TimeChangeRule tcr2 = {"tcr2", Second, Sun, Mar, 2, -240}; // utc -4h, valid from second sunday of march at 2am +//TimeChangeRule tcr1 = {"tcr1", First, Sun, Nov, 2, -300}; // utc -5h, valid from first sunday of november at 2am +//TimeChangeRule tcr2 = {"tcr2", Second, Sun, Mar, 2, -240}; // utc -4h, valid from second sunday of march at 2am //----------------------------------------------- /* Europe */ -// TimeChangeRule tcr1 = {"tcr1", Last, Sun, Oct, 3, 60}; // standard/winter time, valid from last sunday of october at 3am, UTC + 1 hour (+60 minutes) (negative value like -300 for utc -5h) -// TimeChangeRule tcr2 = {"tcr2", Last, Sun, Mar, 2, 120}; // daylight/summer time, valid from last sunday of march at 2am, UTC + 2 hours (+120 minutes) + TimeChangeRule tcr1 = {"tcr1", Last, Sun, Oct, 3, 60}; // standard/winter time, valid from last sunday of october at 3am, UTC + 1 hour (+60 minutes) (negative value like -300 for utc -5h) + TimeChangeRule tcr2 = {"tcr2", Last, Sun, Mar, 2, 120}; // daylight/summer time, valid from last sunday of march at 2am, UTC + 2 hours (+120 minutes) //----------------------------------------------- Timezone myTimeZone(tcr1, tcr2); #endif @@ -182,7 +182,7 @@ int ORIENTATION = 0; /* Start basic appearance config------------------------------------------------------------------------ */ const bool dotsBlinking = false; // true = only light up dots on even seconds, false = always on const bool leadingZero = false; // true = enable a leading zero, 9:00 -> 09:00, 1:30 -> 01:30... -uint8_t displayMode = 1; // 0 = 24h mode, 1 = 12h mode ("1" will also override setting that might be written to EEPROM!) +uint8_t displayMode = 0; // 0 = 24h mode, 1 = 12h mode ("1" will also override setting that might be written to EEPROM!) uint8_t colorMode = 0; // different color modes, setting this to anything else than zero will overwrite values written to eeprom, as above uint16_t colorSpeed = 750; // controls how fast colors change, smaller = faster (interval in ms at which color moves inside colorizeOutput();) const bool colorPreview = true; // true = preview selected palette/colorMode using "8" on all positions for 3 seconds @@ -192,8 +192,8 @@ const uint8_t brightnessLevels[3]{80, 130, 220}; // 0 - 255, brightness Levels ( uint8_t brightness = brightnessLevels[0]; // default brightness if none saved to eeprom yet / first run #ifdef FADING uint8_t fadeDigits = 2; // fade digit segments, 0 = disabled, 1 = only fade out segments turned off, 2 = fade old out and fade new in -uint8_t fadeDots = 2; // fade dots, 0 = disabled, 1 = turn dots off without fading in/out after specidfied time, 2 = fade in and out -uint8_t fadeDelay = 15; // milliseconds between each fading step, 5-25 should work okay-ish +uint8_t fadeDots = 0; // fade dots, 0 = disabled, 1 = turn dots off without fading in/out after specidfied time, 2 = fade in and out +uint8_t fadeDelay = 25; // milliseconds between each fading step, 5-25 should work okay-ish #endif /* End basic appearance config-------------------------------------------------------------------------- */ @@ -328,37 +328,37 @@ const uint16_t segGroups[42][2] PROGMEM = { /* segments 0-27, 4 digits x 7 segments */ /* digit position 0 */ - {48, 40}, // top, a - {32, 33}, // top right, b - {34, 35}, // bottom right, c - {43, 51}, // bottom, d - {59, 58}, // bottom left, e - {57, 56}, // top left, f - {49, 41}, // center, g + {1, 2}, // top, a + {3, 11}, // top right, b + {19, 27}, // bottom right, c + {25, 26}, // bottom, d + {24, 16}, // bottom left, e + {0, 8}, // top left, f + {9, 10}, // center, g /* digit position 1 */ - {16, 8}, // top, a - {0, 1}, // top right, b - {2, 3}, // bottom right, c - {11, 19}, // bottom, d - {27, 26}, // bottom left, e - {25, 24}, // top left, f - {17, 9}, // center, g + {5, 6}, // top, a + {7, 15}, // top right, b + {23, 31}, // bottom right, c + {29, 30}, // bottom, d + {28, 20}, // bottom left, e + {04, 12}, // top left, f + {13, 14}, // center, g /* digit position 2 */ - {52, 44}, // top, a - {36, 37}, // top right, b - {38, 39}, // bottom right, c - {47, 55}, // bottom, d - {63, 62}, // bottom left, e - {61, 60}, // top left, f - {53, 45}, // center, g + {33, 34}, // top, a + {35, 43}, // top right, b + {51, 59}, // bottom right, c + {57, 58}, // bottom, d + {56, 48}, // bottom left, e + {32, 40}, // top left, f + {41, 42}, // center, g /* digit position 3 */ - {20, 12}, // top, a - {4, 5}, // top right, b - {6, 7}, // bottom right, c - {23, 15}, // bottom, d - {31, 30}, // bottom left, e - {28, 29}, // top left, f - {21, 13}, // center, g + {37, 38}, // top, a + {39, 47}, // top right, b + {55, 63}, // bottom right, c + {61, 62}, // bottom, d + {60, 52}, // bottom left, e + {36, 44}, // top left, f + {45, 46}, // center, g #if (LED_DIGITS == 6) // add two digits, 14 segments, only used if LED_DIGITS is 6... /* segments 28-41, 6 digits x 7 segments */ /* (bogus on some models which don't support 6 digits) */ @@ -383,8 +383,8 @@ const uint16_t segGroups[42][2] PROGMEM = { }; #if (LED_DIGITS == 4) -const uint16_t upperDots[2] PROGMEM = {50}; // leds inside the upper dots (right on L7-QBE) -const uint16_t lowerDots[2] PROGMEM = {42}; // leds inside the lower dots (left on L7-QBE) +const uint16_t upperDots[2] PROGMEM = {18}; // leds inside the upper dots (right on L7-QBE) +const uint16_t lowerDots[2] PROGMEM = {19}; // leds inside the lower dots (left on L7-QBE) #endif #if (LED_DIGITS == 6) @@ -392,8 +392,8 @@ const uint16_t upperDots[4] PROGMEM = {49, 50, 103, 104}; // all the leds inside const uint16_t lowerDots[4] PROGMEM = {52, 53, 106, 107}; // all the leds inside the lower dots (bogus values on some models which don't support 6 digits) #endif -const uint16_t amLight[1] PROGMEM = {54}; -const uint16_t pmLight[1] PROGMEM = {14}; +const uint16_t amLight[1] PROGMEM = {21}; +const uint16_t pmLight[1] PROGMEM = {22}; // Using above arrays it's very easy to "talk" to the segments. Simply use 0-6 for the first 7 segments, add 7 (7-13) for the second one, 14-20 for third.... const uint8_t digits[21][7] PROGMEM = {