This usermod could be used in compination with usermod_v2_rotary_encoder_ui_ALT.
Press the encoder to cycle through the options:
- Brightness
- Speed
- Intensity
- Palette
- Effect
- Main Color
- Saturation
Press and hold the encoder to display Network Info. If AP is active, it will display the AP, SSID and Password
Also shows if the timer is enabled.
See the pair of usermods in action
Copy the example platformio_override.sample.ini to the root directory of your particular build.
These options are configurable in Config > Usermods
- Global I2C GPIOs (HW) - Set the SDA and SCL pins
enabled- enable/disable usermodtype- display type in numeric format- 1 = I2C SSD1306 128x32
- 2 = I2C SH1106 128x32
- 3 = I2C SSD1306 128x64 (4 double-height lines)
- 4 = I2C SSD1305 128x32
- 5 = I2C SSD1305 128x64 (4 double-height lines)
- 6 = SPI SSD1306 128x32
- 7 = SPI SSD1306 128x64 (4 double-height lines)
- 8 = SPI SSD1309 128x64 (4 double-height lines)
- 9 = I2C SSD1309 128x64 (4 double-height lines)
pin- GPIO pins used for display; SPI displays can use SCK, MOSI, CS, DC & RSTflip- flip/rotate display 180°contrast- set display contrast (higher contrast may reduce display lifetime)screenTimeOutSec- screen saver time-out in secondssleepMode- enable/disable screen saverclockMode- enable/disable clock display in screen saver modeshowSeconds- Show seconds on the clock displayi2c-freq-kHz- I2C clock frequency in kHz (may help reduce dropped frames, range: 400-3400)
Note: the Four Line Display usermod requires the libraries U8g2 and Wire.
Some boards require special initialization for I2C displays. Set these flags in your platformio_override.ini (do not edit the main platformio.ini):
-
FLD_PIN_RESET- GPIO pin for display hardware reset (optional)- Performs a reset pulse before I2C initialization
- Required on boards like Heltec WiFi LoRa 32 V3 (GPIO21)
- Example:
-D FLD_PIN_RESET=21
-
HELTEC_VEXT_PIN- GPIO pin to enable switchable OLED power rail (optional)- Pulls the pin LOW before display init to enable power
- Required on boards where the OLED is powered via a switchable rail rather than always-on VCC
- Example:
-D HELTEC_VEXT_PIN=36for Heltec WiFi LoRa 32 V3
2021-10
- First public release