diff --git a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino index 915289523..c73170645 100644 --- a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino +++ b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino @@ -1,12 +1,18 @@ #include // from https://github.com/olikraus/u8g2/ +//The SCL and SDA pins are defined here. +//Lolin32 boards use SCL=4 SDA=5 +#define U8X8_PIN_SCL 5 +#define U8X8_PIN_SDA 4 + + // If display does not work or looks corrupted check the // constructor reference: // https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // or check the gallery: // https://github.com/olikraus/u8g2/wiki/gallery -U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, 5, - 4); // Pins are Reset, SCL, SDA +U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, + U8X8_PIN_SDA); // Pins are Reset, SCL, SDA // gets called once at boot. Do all initialization that doesn't depend on // network here @@ -63,7 +69,11 @@ void userLoop() { needRedraw = false; // Update last known values. + #if defined(ESP8266) knownSsid = apActive ? WiFi.softAPSSID() : WiFi.SSID(); + #else + knownSsid = WiFi.SSID(); + #endif knownIp = apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP(); knownBrightness = bri; knownMode = strip.getMode(); @@ -74,9 +84,9 @@ void userLoop() { // First row with Wifi name u8x8.setCursor(1, 0); - u8x8.print(ssid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0)); + u8x8.print(knownSsid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0)); // Print `~` char to indicate that SSID is longer, than owr dicplay - if (ssid.length() > u8x8.getCols()) + if (knownSsid.length() > u8x8.getCols()) u8x8.print("~"); // Second row with IP or Psssword @@ -85,7 +95,7 @@ void userLoop() { if (apActive && bri == 0) u8x8.print(apPass); else - u8x8.print(ip); + u8x8.print(knownIp); // Third row with mode name u8x8.setCursor(2, 2); diff --git a/wled00/FX.h b/wled00/FX.h index 77788eab6..53096b7e0 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -571,7 +571,7 @@ class WS2812FX { //10 names per line const char JSON_mode_names[] PROGMEM = R"=====([ "Solid","Blink","Breathe","Wipe","Wipe Random","Random Colors","Sweep","Dynamic","Colorloop","Rainbow", -"Scan","Dual Scan","Fade","Theater","Theater Rainbow","Running","Saw","Twinkle","Dissolve","Dissolve Rnd", +"Scan","Scan Dual","Fade","Theater","Theater Rainbow","Running","Saw","Twinkle","Dissolve","Dissolve Rnd", "Sparkle","Sparkle Dark","Sparkle+","Strobe","Strobe Rainbow","Strobe Mega","Blink Rainbow","Android","Chase","Chase Random", "Chase Rainbow","Chase Flash","Chase Flash Rnd","Rainbow Runner","Colorful","Traffic Light","Sweep Random","Running 2","Red & Blue","Stream", "Scanner","Lighthouse","Fireworks","Rain","Merry Christmas","Fire Flicker","Gradient","Loading","Police","Police All", diff --git a/wled00/wled00.ino b/wled00/wled00.ino index 34403ee37..3a9b8a00f 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -98,7 +98,7 @@ //version code in format yymmddb (b = daily build) -#define VERSION 1912211 +#define VERSION 1912221 char versionString[] = "0.9.0-b2";