Skip to content

Instantly share code, notes, and snippets.

@roelbroersma
Last active November 4, 2023 16:25
Show Gist options
  • Save roelbroersma/91a2fe9090d978d7187959968d9d1fb3 to your computer and use it in GitHub Desktop.
Save roelbroersma/91a2fe9090d978d7187959968d9d1fb3 to your computer and use it in GitHub Desktop.
Multipin relay support in WLED (change usermods/esp32_multistrip/NpbWrapper.h )
Add the following code in usermods/esp32_multistrip/NpbWrapper.h after:
#ifndef RLYPIN
#define RLYPIN -1 //pin for relay, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN2
#define RLYPIN2 -1 //pin for relay2, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN3
#define RLYPIN3 -1 //pin for rela3, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN4
#define RLYPIN4 -1 //pin for relay4, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN5
#define RLYPIN5 -1 //pin for relay5, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN6
#define RLYPIN6 -1 //pin for relay6, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN7
#define RLYPIN7 -1 //pin for relay7, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
#ifndef RLYPIN8
#define RLYPIN8 -1 //pin for relay8, will be set HIGH if LEDs are on (-1 to disable). Also usable for standby leds, triggers,...
#endif
And after the following:
#ifndef RLYMDE
#define RLYMDE 1 //mode for relay, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
Add these lines:
#ifndef RLYMDE2
#define RLYMDE2 1 //mode for relay2, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE3
#define RLYMDE3 1 //mode for relay3, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE4
#define RLYMDE4 1 //mode for relay4, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE5
#define RLYMDE5 1 //mode for relay5, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE6
#define RLYMDE6 1 //mode for relay6, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE7
#define RLYMDE7 1 //mode for relay7, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
#ifndef RLYMDE8
#define RLYMDE8 1 //mode for relay8, 0: LOW if LEDs are on 1: HIGH if LEDs are on
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment