Swipe backwards
This commit is contained in:
@@ -22,6 +22,7 @@ Esp32DriverRGBW ledDriver;
|
||||
|
||||
LedTask<decltype(ledStrip)> ledTask;
|
||||
|
||||
bool fox;
|
||||
void tag_handler(uint8_t *sn)
|
||||
{
|
||||
// serial number is always 5 bytes long
|
||||
@@ -33,19 +34,27 @@ void tag_handler(uint8_t *sn)
|
||||
if (sn[4] == 0x30)
|
||||
{
|
||||
Serial.println("Fuchs");
|
||||
fox = true;
|
||||
//ledTask.startEffect(EffectCircularConfig{2 * 360, 180, ColorRGBW{0, 0, 255, 0}});
|
||||
ledTask.startEffect(EffectAlexaSwipeConfig{20, 30, 3 * 360, 3, 180, ColorRGBW{0, 255, 0, 0}, ColorRGBW{0, 0, 255, 0}});
|
||||
ledTask.startEffect(EffectAlexaSwipeConfig{20, 30, 3 * 360, 3, 180, true, ColorRGBW{0, 255, 0, 0}, ColorRGBW{0, 0, 255, 0}});
|
||||
}
|
||||
if (sn[4] == 0xf0)
|
||||
{
|
||||
Serial.println("Eule");
|
||||
fox = false;
|
||||
ledTask.startEffect(EffectCircularConfig{360, 180, ColorRGBW{0, 0, 255, 0}});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.println("Nichts");
|
||||
ledTask.startEffect(EffectStaticConfig{ColorRGBW{0, 0, 0, 0}});
|
||||
if (fox)
|
||||
{
|
||||
fox = false;
|
||||
ledTask.startEffect(EffectAlexaSwipeConfig{20, 30, 3 * 360, 3, 180, false, ColorRGBW{0, 255, 0, 0}, ColorRGBW{0, 0, 255, 0}});
|
||||
}
|
||||
else
|
||||
ledTask.startEffect(EffectStaticConfig{ColorRGBW{0, 0, 0, 0}});
|
||||
}
|
||||
//led.transmit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user