2020-01-25 00:39:04 +01:00
|
|
|
# Blynk controllable relay
|
2022-12-10 16:12:55 +01:00
|
|
|
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
|
|
|
|
2022-12-10 16:12:55 +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
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
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
|
2022-12-10 16:12:55 +01:00
|
|
|
//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
|
2022-12-10 16:12:55 +01:00
|
|
|
//Number of milliseconds between Blynk updates
|
2020-01-25 00:39:04 +01:00
|
|
|
#define BLYNK_RELAY_UPDATE_INTERVAL 5000
|
|
|
|
```
|