Usermod quinled-an-penta: Updated IOs for v1r1 release (#2429)
* UM QuinLED-An-Penta: First version * UM QuinLED-An-Penta: Made OLED seconds a setting; small improvements * UM QuinLED-An-Penta: Fixed unique ID * Merge branch 'master' of https://github.com/Aircoookie/WLED * UM QuinLED-An-Penta: Fixed config loading * UM QuinLED-An-Penta: Replaced ledcRead() with calculating the percentage * UM QuinLED-An-Penta: Fixed temp sensor readings * UM QuinLED-An-Penta: Removing OLED bus clk setting * UM QuinLED-An-Penta: ETH support, lots of OLED improvements * UM quinled-an-penta: v1r1 adjustments
This commit is contained in:
parent
c27117e99e
commit
cd95abb2a1
@ -61,10 +61,10 @@ class QuinLEDAnPentaUsermod : public Usermod
|
|||||||
float shtLastKnownHumidity = 0;
|
float shtLastKnownHumidity = 0;
|
||||||
|
|
||||||
// Pin/IO vars
|
// Pin/IO vars
|
||||||
const int8_t anPentaPins[5] = {14, 13, 12, 4, 2};
|
const int8_t anPentaLEDPins[5] = {14, 13, 12, 4, 2};
|
||||||
int8_t oledSpiClk = 15;
|
int8_t oledSpiClk = 15;
|
||||||
int8_t oledSpiData = 16;
|
int8_t oledSpiData = 16;
|
||||||
int8_t oledSpiCs = 0;
|
int8_t oledSpiCs = 27;
|
||||||
int8_t oledSpiDc = 32;
|
int8_t oledSpiDc = 32;
|
||||||
int8_t oledSpiRst = 33;
|
int8_t oledSpiRst = 33;
|
||||||
int8_t shtSda = 1;
|
int8_t shtSda = 1;
|
||||||
@ -75,7 +75,7 @@ class QuinLEDAnPentaUsermod : public Usermod
|
|||||||
{
|
{
|
||||||
for(int8_t i = 0; i <= 4; i++)
|
for(int8_t i = 0; i <= 4; i++)
|
||||||
{
|
{
|
||||||
if(anPentaPins[i] == pin)
|
if(anPentaLEDPins[i] == pin)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -313,7 +313,7 @@ class QuinLEDAnPentaUsermod : public Usermod
|
|||||||
byte drawnLines = 0;
|
byte drawnLines = 0;
|
||||||
for (int8_t app = 0; app <= 4; app++) {
|
for (int8_t app = 0; app <= 4; app++) {
|
||||||
for (int8_t clp = 0; clp <= 4; clp++) {
|
for (int8_t clp = 0; clp <= 4; clp++) {
|
||||||
if (anPentaPins[app] == currentLedPins[clp]) {
|
if (anPentaLEDPins[app] == currentLedPins[clp]) {
|
||||||
char charCurrentLedcReads[17];
|
char charCurrentLedcReads[17];
|
||||||
sprintf(charCurrentLedcReads, "LED %d:", app+1);
|
sprintf(charCurrentLedcReads, "LED %d:", app+1);
|
||||||
if (oledUseProgressBars) {
|
if (oledUseProgressBars) {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# QuinLED-An-Penta
|
# QuinLED-An-Penta
|
||||||
The (un)official usermod to get the best out of the QuinLED-An-Penta, like using the OLED and the SHT30 temperature/humidity sensor.
|
The (un)official usermod to get the best out of the QuinLED-An-Penta (https://quinled.info/quinled-an-penta/), like using the OLED and the SHT30 temperature/humidity sensor.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
* "u8gs" by olikraus, v2.28 or higher: https://github.com/olikraus/u8g2
|
* "u8gs" by olikraus, v2.28 or higher: https://github.com/olikraus/u8g2
|
||||||
* "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85
|
* "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85
|
||||||
|
|
||||||
## Usermod installation
|
## 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 QUINLED_AN_PENTA`.
|
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):
|
ESP32 (**without** ethernet):
|
||||||
```
|
```
|
||||||
@ -33,14 +33,19 @@ This mod has been optimized for an SSD1306 driven 128x64 OLED. Using a smaller O
|
|||||||
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.
|
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.
|
||||||
Also note, you need to have an **SPI** driven OLED, **not i2c**!
|
Also note, you need to have an **SPI** driven OLED, **not i2c**!
|
||||||
|
|
||||||
|
### Limitations combined with Ethernet
|
||||||
|
The initial development of this mod had been done with a beta version of the QuinLED-An-Penta, which had a different IO layout for the OLED: The CS pin used to be IO_0, but has been changed to IO27 with the first v1 public release. Unfortunately, IO27 is used by the Ethernet boards, so WLED will not let you enable the OLED screen, if you're using it with Ethernet. This unfortunately makes the development I've done to support/show Ethernet information void, as it cannot be used.
|
||||||
|
However (and I've not tried this, as I don't own a v1 board): You can try to modify this mod and try to use IO27 for the OLED and share it with the Ethernet board. It is "just" the chip select pin, so there is a chance that both can coexist and use the same IO. You need to skip WLEDs PinManager for the CS pin, so WLED will not block using it. If you don't know how this works: Leave it. If you know what I'm talking about: Try it and please let me know on the Intermit.Tech (QuinLED) Discord server: https://discord.gg/WdbAauG
|
||||||
|
|
||||||
### My OLED flickers after some time, what should I do?
|
### My OLED flickers after some time, what should I do?
|
||||||
That's a tricky one: During development I saw that the OLED sometimes starts to "bug out" / flicker and won't work anymore. This seems to be caused by the high PWM interference the board produces. It seems to loose it's settings and then doesn't know how to draw anymore. Turns out the only way to fix this is to call the libraries `begin()` method again which will re-initialize the display.
|
That's a tricky one: During development I saw that the OLED sometimes starts to "bug out" / flicker and won't work anymore. This seems to be caused by the high PWM interference the board produces. It seems to loose its settings and then doesn't know how to draw anymore. Turns out the only way to fix this is to call the libraries `begin()` method again which will re-initialize the display.
|
||||||
If you're facing this issue, you can enable a setting I've added which will call the `begin()` roughly every 60 seconds between a page change. This will make the page change take ~500ms, but will fix the display.
|
If you're facing this issue, you can enable a setting I've added which will call the `begin()` roughly every 60 seconds between a page change. This will make the page change take ~500ms, but will fix the display.
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
Navigate to the "Config" and then to the "Usermods" section. If you compiled WLED with `-D QUINLED_AN_PENTA`, you will see the config for it there:
|
Navigate to the "Config" and then to the "Usermods" section. If you compiled WLED with `-D QUINLED_AN_PENTA`, you will see the config for it there:
|
||||||
* Enable-OLED:
|
* Enable-OLED:
|
||||||
* What it does: Enabled the optional SPI driven OLED that can be mounted to the 7-pin female header
|
* What it does: Enables the optional SPI driven OLED that can be mounted to the 7-pin female header. Won't work with Ethernet, read above.
|
||||||
* Possible values: Enabled/Disabled
|
* Possible values: Enabled/Disabled
|
||||||
* Default: Disabled
|
* Default: Disabled
|
||||||
* OLED-Use-Progress-Bars:
|
* OLED-Use-Progress-Bars:
|
||||||
@ -60,10 +65,15 @@ Navigate to the "Config" and then to the "Usermods" section. If you compiled WLE
|
|||||||
* Possible values: Enabled/Disabled
|
* Possible values: Enabled/Disabled
|
||||||
* Default: Disabled
|
* Default: Disabled
|
||||||
* Enable-SHT30-Temp-Humidity-Sensor:
|
* Enable-SHT30-Temp-Humidity-Sensor:
|
||||||
* What it does: Enabled the onboard SHT30 temperature and humidity sensor
|
* What it does: Enables the onboard SHT30 temperature and humidity sensor
|
||||||
* Possible values: Enabled/Disabled
|
* Possible values: Enabled/Disabled
|
||||||
* Default: Disabled
|
* Default: Disabled
|
||||||
|
|
||||||
## Change log
|
## Change log
|
||||||
|
2021-12
|
||||||
|
* Adjusted IO layout to match An-Penta v1r1
|
||||||
2021-10
|
2021-10
|
||||||
* First implementation.
|
* First implementation.
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
ezcGman | Andy: Find me on the Intermit.Tech (QuinLED) Discord server: https://discord.gg/WdbAauG
|
Loading…
Reference in New Issue
Block a user