From 2dafa9644ffaf48e62d89b2ef6e3cf5b674e1006 Mon Sep 17 00:00:00 2001 From: thatdonfc Date: Tue, 19 Mar 2024 14:48:51 -0700 Subject: [PATCH] Update Readme for Rotary Encoder Usermod Add example platformio_override.sample.ini --- .../platformio–override.sample.ini | 17 +++++++++ .../readme.md | 35 +++++++++++++------ 2 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 usermods/usermod_v2_rotary_encoder_ui_ALT/platformio–override.sample.ini diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/platformio–override.sample.ini b/usermods/usermod_v2_rotary_encoder_ui_ALT/platformio–override.sample.ini new file mode 100644 index 000000000..6b32c71fb --- /dev/null +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/platformio–override.sample.ini @@ -0,0 +1,17 @@ +[platformio] +default_envs = esp32dev + +[env:esp32dev] +board = esp32dev +platform = ${esp32.platform} +build_unflags = ${common.build_unflags} +build_flags = + ${common.build_flags_esp32} + -D USERMOD_FOUR_LINE_DISPLAY -D USE_ALT_DISPlAY + -D USERMOD_ROTARY_ENCODER_UI -D ENCODER_DT_PIN=18 -D ENCODER_CLK_PIN=5 -D ENCODER_SW_PIN=19 +upload_speed = 460800 +lib_deps = + ${esp32.lib_deps} + U8g2@~2.34.4 + Wire + diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/readme.md b/usermods/usermod_v2_rotary_encoder_ui_ALT/readme.md index 516362380..10db879fb 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/readme.md +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/readme.md @@ -8,18 +8,18 @@ The core of these usermods are a copy of the originals. The main changes are to The display usermod UI has been completely changed. -The changes made to the RotaryEncoder usermod were made to support the new UI in the display usermod. +The changes made to the RotaryEncoder usermod were made to support the new UI in the display usermod. Without the display, it functions identical to the original. The original "usermod_v2_auto_save" will not work with the display just yet. Press the encoder to cycle through the options: - *Brightness - *Speed - *Intensity - *Palette - *Effect - *Main Color (only if display is used) - *Saturation (only if display is used) +* Brightness +* Speed +* Intensity +* Palette +* Effect +* Main Color (only if display is used) +* Saturation (only if display is used) Press and hold the encoder to display Network Info if AP is active, it will display the AP, SSID and Password @@ -30,10 +30,23 @@ Also shows if the timer is enabled. ## Installation -Please refer to the original `usermod_v2_rotary_encoder_ui` readme for the main instructions.
-To activate this alternative usermod, add `#define USE_ALT_DISPlAY` to the `usermods_list.cpp` file, -or add `-D USE_ALT_DISPlAY` to the original `platformio_override.ini.sample` file. +Copy the example `platformio_override.sample.ini` to the root directory of your particular build and rename it to `platformio_override.ini`. +To activate this alternative usermod, add `#define USE_ALT_DISPlAY` (NOTE: CASE SENSITIVE) to the `usermods_list.cpp` file, or add `-D USE_ALT_DISPlAY` to your `platformio_override.ini` file + +### Define Your Options + +* `USERMOD_ROTARY_ENCODER_UI` - define this to have this user mod included wled00\usermods_list.cpp +* `USERMOD_FOUR_LINE_DISPLAY` - define this to have this the Four Line Display mod included wled00\usermods_list.cpp + also tells this usermod that the display is available + (see the Four Line Display usermod `readme.md` for more details) +* `USE_ALT_DISPlAY` - Mandatory to use Four Line Display +* `ENCODER_DT_PIN` - defaults to 18 +* `ENCODER_CLK_PIN` - defaults to 5 +* `ENCODER_SW_PIN` - defaults to 19 +* `USERMOD_ROTARY_ENCODER_GPIO` - GPIO functionality: + `INPUT_PULLUP` to use internal pull-up + `INPUT` to use pull-up on the PCB ### PlatformIO requirements