Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usermod libs migration #4481

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Defining more usermod dependencies
netmindz committed Jan 12, 2025
commit 075fd4da2d9ddc71f6a755a5a2edddad25fbc4d2
5 changes: 4 additions & 1 deletion usermods/DHT/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"DHT_nonblocking":"https://github.com/alwynallan/DHT_nonblocking"
}
}
}
5 changes: 4 additions & 1 deletion usermods/INA226_v2/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"wollewald/INA226_WE":"~1.2.9"
}
}
}
5 changes: 4 additions & 1 deletion usermods/MAX17048_v2/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"Adafruit_MAX1704X":"https://github.com/adafruit/Adafruit_MAX1704X#1.0.2"
}
}
}
13 changes: 0 additions & 13 deletions usermods/ST7789_display/README.md
Original file line number Diff line number Diff line change
@@ -27,19 +27,6 @@ This usermod enables display of the following:

### Platformio.ini changes

In the `platformio.ini` file, uncomment the `TFT_eSPI` line within the [common] section, under `lib_deps`:

```ini
# platformio.ini
...
[common]
...
lib_deps =
...
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
...
```

In the `platformio.ini` file, you must change the environment setup to build for just the esp32dev platform as follows:

5 changes: 4 additions & 1 deletion usermods/VL53L0X_gestures/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"pololu/VL53L0X" : "^1.3.0"
}
}
}
16 changes: 0 additions & 16 deletions usermods/VL53L0X_gestures/readme.md
Original file line number Diff line number Diff line change
@@ -10,20 +10,4 @@ Useful for controlling strips when you want to avoid touching anything.

1. Attach VL53L0X sensor to i2c pins according to default pins for your board.
2. Add `-D USERMOD_VL53L0X_GESTURES` to your build flags at platformio.ini (plaformio_override.ini) for needed environment.
In my case, for example: `build_flags = ${env.build_flags} -D USERMOD_VL53L0X_GESTURES`
3. Add "pololu/VL53L0X" dependency below to `lib_deps` like this:
```ini
lib_deps = ${env.lib_deps}
pololu/VL53L0X @ ^1.3.0
```

My entire `platformio_override.ini` for example (for nodemcu board):
```ini
[platformio]
default_envs = nodemcuv2

[env:nodemcuv2]
build_flags = ${env.build_flags} -D USERMOD_VL53L0X_GESTURES
lib_deps = ${env.lib_deps}
pololu/VL53L0X @ ^1.3.0
```
5 changes: 4 additions & 1 deletion usermods/mpu6050_imu/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"electroniccats/MPU6050":"1.0.1"
}
}
}
6 changes: 5 additions & 1 deletion usermods/quinled-an-penta/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,9 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"olikraus/U8g2":"~2.28.8",
"robtillaart/SHT85":"~0.3.3"
}
}
}
4 changes: 2 additions & 2 deletions usermods/quinled-an-penta/quinled-an-penta.cpp
Original file line number Diff line number Diff line change
@@ -754,5 +754,5 @@ const unsigned char QuinLEDAnPentaUsermod::quinLedLogo[] PROGMEM = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};

static QuinLEDAnPentaUsermod quinled-an-penta;
REGISTER_USERMOD(quinled-an-penta);
static QuinLEDAnPentaUsermod quinled_an_penta;
REGISTER_USERMOD(quinled_an_penta);
23 changes: 0 additions & 23 deletions usermods/quinled-an-penta/readme.md
Original file line number Diff line number Diff line change
@@ -5,29 +5,6 @@ The (un)official usermod to get the best out of the QuinLED-An-Penta (https://qu
* "u8g2" by olikraus, v2.28 or higher: https://github.com/olikraus/u8g2
* "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85

## Usermod installation
Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the buildflag `-D QUINLED_AN_PENTA` and the below library dependencies.

ESP32 (**without** ethernet):
```
[env:custom_esp32dev_usermod_quinled_an_penta]
extends = env:esp32dev
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D QUINLED_AN_PENTA
lib_deps = ${esp32.lib_deps}
olikraus/U8g2@~2.28.8
robtillaart/SHT85@~0.2.0
```

ESP32 (**with** ethernet):
```
[env:custom_esp32dev_usermod_quinled_an_penta]
extends = env:esp32dev
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D WLED_USE_ETHERNET -D QUINLED_AN_PENTA
lib_deps = ${esp32.lib_deps}
olikraus/U8g2@~2.28.8
robtillaart/SHT85@~0.2.0
```

## Some words about the (optional) OLED
This mod has been optimized for an SSD1306 driven 128x64 OLED. Using a smaller OLED or an OLED using a different driver will result in unexpected results.
I highly recommend using these "two color monochromatic OLEDs", which have the first 16 pixels in a different color than the other 48, e.g. a yellow/blue OLED.
5 changes: 4 additions & 1 deletion usermods/rgb-rotary-encoder/library.json
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@
"includeDir": "../../wled00",
"libLDFMode": "chain+",
"libArchive": false
},
"dependencies": {
"lennarthennigs/ESP Rotary":"^2.1.1"
}
}
}
24 changes: 0 additions & 24 deletions usermods/rgb-rotary-encoder/readme.md
Original file line number Diff line number Diff line change
@@ -8,30 +8,6 @@ https://user-images.githubusercontent.com/3090131/124680599-0180ab80-dec7-11eb-9
The actual / original code that controls the LED modes is from Adam Zeloof. I take no credit for it. I ported it to WLED, which involved replacing the LED library he used, (because WLED already has one, so no need to add another one) plus the rotary encoder library because it was not compatible with ESP, only Arduino.
It was quite a bit more work than I hoped, but I got there eventually :)

## Requirements
* "ESP Rotary" by Lennart Hennigs, v2.1.1 or higher: https://github.com/LennartHennigs/ESPRotary

## Usermod installation
Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one and add the buildflag `-D RGB_ROTARY_ENCODER`.

ESP32:
```
[env:custom_esp32dev_usermod_rgb_encoder_board]
extends = env:esp32dev
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D RGB_ROTARY_ENCODER
lib_deps = ${esp32.lib_deps}
lennarthennigs/ESP Rotary@^2.1.1
```

ESP8266 / D1 Mini:
```
[env:custom_d1_mini_usermod_rgb_encoder_board]
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266} -D RGB_ROTARY_ENCODER
lib_deps = ${esp8266.lib_deps}
lennarthennigs/ESP Rotary@^2.1.1
```

## How to connect the board to your ESP
We'll need (minimum) three or (maximum) four GPIOs for the board:
* "ea": reports the encoder direction
4 changes: 2 additions & 2 deletions usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp
Original file line number Diff line number Diff line change
@@ -342,5 +342,5 @@ const char RgbRotaryEncoderUsermod::_ledBrightness[] PROGMEM = "LED-Brightne
const char RgbRotaryEncoderUsermod::_stepsPerClick[] PROGMEM = "Steps-per-Click";
const char RgbRotaryEncoderUsermod::_incrementPerClick[] PROGMEM = "Increment-per-Click";

static RgbRotaryEncoderUsermod rgb-rotary-encoder;
REGISTER_USERMOD(rgb-rotary-encoder);
static RgbRotaryEncoderUsermod rgb_rotary_encoder;
REGISTER_USERMOD(rgb_rotary_encoder);