Files
WLED_MM_Infinity/usermods/usermod_v2_weather
Ewoud 642d7d91ea i2c_sda, i2c_scl, spi_mosi, spi_miso, spi_sclk without HW_PIN_*, bh1750
platformio: 
- add bh1750 to _max
- define rotary defaults for wemos

usermod_bh1750
- Remove HW_PIN_* and replace by i2c_sda etc
- add appendConfigData

usermods mpu6050_imu, rtc, 4ld, pinmanager
- Remove HW_PIN_* 

change SDA2:pin (etc) to SDA:pin
2023-01-05 16:35:49 +01:00
..

Usermods API v2 example usermod

In this usermod file you can find the documentation on how to take advantage of the new version 2 usermods!

adding usermod specific effects

This usermod also provides an example on how to add your own effects in a usermod.

  • the new effect code is in this function, similar to other effects fx.cpp:
//effect function
uint16_t mode_2DWeather(void) { 

....

  return FRAMETIME;
}
static const char _data_FX_MODE_2DWEATHER[] PROGMEM = "Weather@;!;!;pal=54,2d"; //temperature palette
  • then activated in the usermod setup function
class WeatherUsermod : public Usermod {
  public:
    void setup() {
      strip.addEffect(255, &mode_2DWeather, _data_FX_MODE_2DWEATHER);
    }

Installation

Copy usermod_v2_example.h to the wled00 directory.
Uncomment the corresponding lines in usermods_list.cpp and compile!
(You shouldn't need to actually install this, it does nothing useful)