WLED/usermods/blynk_relay_control/README.md

29 lines
989 B
Markdown
Raw Normal View History

2020-01-25 00:39:04 +01:00
# Blynk controllable relay
Enables controlling a relay state via user variables. Allows the user variables to be set via Blynk.
2020-01-25 00:39:04 +01:00
Optionally, the servo can have a reset timer to return to its default state after a user definable interval. The interval is set via userVar1.
2020-01-25 00:39:04 +01:00
## Instalation
Replace the WLED06_usermod.ino file in Aircoookies WLED folder, with the one here.
2020-01-25 00:39:04 +01:00
## Customizations
Update the following parameters in WLED06_usermod.ino to configure the mod's behavior:
```cpp
//Which pin is the relay connected to
#define RELAY_PIN 5
//Which pin state should the relay default to
#define RELAY_PIN_DEFAULT LOW
//If >0 The controller returns to RELAY_PIN_DEFAULT after this time, in milliseconds
2020-01-25 00:39:04 +01:00
#define RELAY_PIN_TIMER_DEFAULT 3000
//Blynk virtual pin for controlling relay
#define BLYNK_USER_VAR0_PIN V9
//Blynk virtual pin for controlling relay timer
#define BLYNK_USER_VAR1_PIN V10
//Number of milliseconds between Blynk updates
2020-01-25 00:39:04 +01:00
#define BLYNK_RELAY_UPDATE_INTERVAL 5000
```