Fixing stairway usermod and adding buildflags
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
### Stairway lighting
|
||||
# Stairway lighting
|
||||
|
||||
## Install
|
||||
Add the buildflag `-D USERMOD_STAIRCASE_WIPE` to your enviroment to activate it.
|
||||
|
||||
### Configuration
|
||||
`-D STAIRCASE_WIPE_OFF`
|
||||
<br>Have the LEDs wipe off instead of fading out
|
||||
|
||||
## Description
|
||||
Quick usermod to accomplish something similar to [this video](https://www.youtube.com/watch?v=NHkju5ncC4A).
|
||||
|
||||
This usermod enables you to add a lightstrip alongside or on the steps of a staircase.
|
||||
|
||||
@@ -19,10 +19,12 @@ class StairwayWipeUsermod : public Usermod {
|
||||
unsigned long timeStaticStart = 0;
|
||||
uint16_t previousUserVar0 = 0;
|
||||
|
||||
//moved to buildflag
|
||||
//comment this out if you want the turn off effect to be just fading out instead of reverse wipe
|
||||
#define STAIRCASE_WIPE_OFF
|
||||
//#define STAIRCASE_WIPE_OFF
|
||||
public:
|
||||
|
||||
void setup() {
|
||||
}
|
||||
void loop() {
|
||||
//userVar0 (U0 in HTTP API):
|
||||
//has to be set to 1 if movement is detected on the PIR that is the same side of the staircase as the ESP8266
|
||||
@@ -84,7 +86,7 @@ class StairwayWipeUsermod : public Usermod {
|
||||
|
||||
uint16_t getId()
|
||||
{
|
||||
return USERMOD_ID_EXAMPLE;
|
||||
return USERMOD_ID_STAIRWAY_WIPE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user