Files
WLED_MM_Infinity/usermods/usermod_v2_weather
Frank 50b3c9dc62 library updates
* FastLED 3.5.0 #master (up to 50% faster)
* All ESP32 env use NeoPixelBus 2.7.3 (slightly faster)
* Weather usermod: small update, as fastLED wants an explicit conversion from CRGB -> uint32_t
* weather usermod: avoid using palette color #0 = black
2023-05-07 21:15:31 +02:00
..
2023-01-12 17:32:11 +01:00
2023-05-07 21:15:31 +02: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@;!;!;2;pal=54"; //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)