diff --git a/usermods/mpu6050_imu/readme.md b/usermods/mpu6050_imu/readme.md index adb19ef8..6e3cee3e 100644 --- a/usermods/mpu6050_imu/readme.md +++ b/usermods/mpu6050_imu/readme.md @@ -36,7 +36,7 @@ lib_deps = AsyncTCP@1.0.3 Esp Async WebServer@1.2.0 IRremoteESP8266@2.7.3 - I2Cdevlib-MPU6050@fbde122cc5 + jrowberg/I2Cdevlib-MPU6050@^1.0.0 ``` ## Wiring @@ -78,7 +78,7 @@ to the info object ## Usermod installation 1. Copy the file `usermod_mpu6050_imu.h` to the `wled00` directory. -2. Register the usermod by adding `#include "usermod_mpu6050_imu.h.h"` in the top and `registerUsermod(new MPU6050Driver());` in the bottom of `usermods_list.cpp`. +2. Register the usermod by adding `#include "usermod_mpu6050_imu.h"` in the top and `registerUsermod(new MPU6050Driver());` in the bottom of `usermods_list.cpp`. Example **usermods_list.cpp**: diff --git a/usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h b/usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h index 6274abce..b1a271a6 100644 --- a/usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h +++ b/usermods/seven_segment_display_reloaded/usermod_seven_segment_reloaded.h @@ -384,7 +384,7 @@ public: if (!umSSDRDisplayTime || strip.isUpdating()) { return; } - #ifdef USERMOD_ID_SN_PHOTORESISTOR + #ifdef USERMOD_SN_PHOTORESISTOR if(bri != 0 && umSSDREnableLDR && (millis() - umSSDRLastRefresh > umSSDRResfreshTime)) { if (ptr != nullptr) { uint16_t lux = ptr->getLastLDRValue(); diff --git a/usermods/usermod_v2_word_clock/readme.md b/usermods/usermod_v2_word_clock/readme.md index ae87b744..7b81582f 100644 --- a/usermods/usermod_v2_word_clock/readme.md +++ b/usermods/usermod_v2_word_clock/readme.md @@ -8,6 +8,16 @@ active: enable/disable usermod diplayItIs: enable/disable display of "Es ist" on the clock ledOffset: number of LEDs before the wordclock LEDs +### Update for alternatative wiring pattern +Based on this fantastic work I added an alternative wiring pattern. +For original you have to use a long wire to connect DO - DI from first line to the next line. + +I wired my clock in meander style. So the first LED in second line is in the right. +With this problem every second line was inverted and showed the wrong letter. + +I added a switch in usermod called "meander wiring?" to enable/disable alternativ wiring pattern. + + ## Installation Copy and update the example `platformio_override.ini.sample` @@ -24,4 +34,6 @@ No special requirements. ## Change Log -2022/03/30 initial commit \ No newline at end of file +2022/08/18 added meander wiring pattern. + +2022/03/30 initial commit diff --git a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h index 87f68f48..1068cd96 100644 --- a/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h +++ b/usermods/usermod_v2_word_clock/usermod_v2_word_clock.h @@ -24,15 +24,19 @@ class WordClockUsermod : public Usermod bool usermodActive = false; bool displayItIs = false; int ledOffset = 100; + bool meander = false; // defines for mask sizes #define maskSizeLeds 114 #define maskSizeMinutes 12 + #define maskSizeMinutesMea 12 #define maskSizeHours 6 + #define maskSizeHoursMea 6 #define maskSizeItIs 5 #define maskSizeMinuteDots 4 // "minute" masks + // Normal wiring const int maskMinutes[12][maskSizeMinutes] = { {107, 108, 109, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // :00 @@ -49,7 +53,25 @@ class WordClockUsermod : public Usermod { 7, 8, 9, 10, 33, 34, 35, -1, -1, -1, -1, -1} // :55 fünf vor }; + // Meander wiring + const int maskMinutesMea[12][maskSizeMinutesMea] = + { + { 99, 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // :00 + { 7, 8, 9, 10, 33, 34, 35, 36, -1, -1, -1, -1}, // :05 fünf nach + { 18, 19, 20, 21, 33, 34, 35, 36, -1, -1, -1, -1}, // :10 zehn nach + { 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1}, // :15 viertel + { 11, 12, 13, 14, 15, 16, 17, 33, 34, 35, 36, -1}, // :20 zwanzig nach + { 7, 8, 9, 10, 41, 42, 43, 44, 45, 46, 47, -1}, // :25 fünf vor halb + { 44, 45, 46, 47, -1, -1, -1, -1, -1, -1, -1, -1}, // :30 halb + { 7, 8, 9, 10, 33, 34, 35, 36, 44, 45, 46, 47}, // :35 fünf nach halb + { 11, 12, 13, 14, 15, 16, 17, 41, 42, 43, -1, -1}, // :40 zwanzig vor + { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1}, // :45 dreiviertel + { 18, 19, 20, 21, 41, 42, 43, -1, -1, -1, -1, -1}, // :50 zehn vor + { 7, 8, 9, 10, 41, 42, 43, -1, -1, -1, -1, -1} // :55 fünf vor + }; + // hour masks + // Normal wiring const int maskHours[13][maskSizeHours] = { { 55, 56, 57, -1, -1, -1}, // 01: ein @@ -66,6 +88,23 @@ class WordClockUsermod : public Usermod { 49, 50, 51, -1, -1, -1}, // 11: elf { 94, 95, 96, 97, 98, -1} // 12: zwölf and 00: null }; + // Meander wiring + const int maskHoursMea[13][maskSizeHoursMea] = + { + { 63, 64, 65, -1, -1, -1}, // 01: ein + { 62, 63, 64, 65, -1, -1}, // 01: eins + { 55, 56, 57, 58, -1, -1}, // 02: zwei + { 66, 67, 68, 69, -1, -1}, // 03: drei + { 73, 74, 75, 76, -1, -1}, // 04: vier + { 51, 52, 53, 54, -1, -1}, // 05: fünf + { 83, 84, 85, 86, 87, -1}, // 06: sechs + { 88, 89, 90, 91, 92, 93}, // 07: sieben + { 77, 78, 79, 80, -1, -1}, // 08: acht + {103, 104, 105, 106, -1, -1}, // 09: neun + {106, 107, 108, 109, -1, -1}, // 10: zehn + { 49, 50, 51, -1, -1, -1}, // 11: elf + { 94, 95, 96, 97, 98, -1} // 12: zwölf and 00: null + }; // mask "it is" const int maskItIs[maskSizeItIs] = {0, 1, 3, 4, 5}; @@ -128,14 +167,24 @@ class WordClockUsermod : public Usermod } // update led mask + if (meander) + { + updateLedMask(maskHoursMea[index], maskSizeHoursMea); + } else { updateLedMask(maskHours[index], maskSizeHours); + } } // set minutes void setMinutes(int index) { // update led mask + if (meander) + { + updateLedMask(maskMinutesMea[index], maskSizeMinutesMea); + } else { updateLedMask(maskMinutes[index], maskSizeMinutes); + } } // set minutes dot @@ -360,6 +409,7 @@ class WordClockUsermod : public Usermod top["active"] = usermodActive; top["displayItIs"] = displayItIs; top["ledOffset"] = ledOffset; + top["Meander wiring?"] = meander; } /* @@ -389,6 +439,7 @@ class WordClockUsermod : public Usermod configComplete &= getJsonValue(top["active"], usermodActive); configComplete &= getJsonValue(top["displayItIs"], displayItIs); configComplete &= getJsonValue(top["ledOffset"], ledOffset); + configComplete &= getJsonValue(top["Meander wiring?"], meander); return configComplete; } diff --git a/wled00/wled.h b/wled00/wled.h index f48ce70d..98748bee 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2210101 +#define VERSION 2210200 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG