2way host-firmware comm
This commit is contained in:
@@ -34,6 +34,7 @@ void tag_handler(uint8_t *sn)
|
||||
|
||||
Serial.printf("Tag: %#x %#x %#x %#x %#x\n",
|
||||
sn[0], sn[1], sn[2], sn[3], sn[4]);
|
||||
sendMessageToHost(MsgRfidTokenRead{{sn[0], sn[1], sn[2], sn[3], sn[4]}});
|
||||
if (sn[4] == 0x30)
|
||||
{
|
||||
Serial.println("Fuchs");
|
||||
@@ -41,8 +42,8 @@ void tag_handler(uint8_t *sn)
|
||||
//ledTask.startEffect(EffectCircularConfig{2 * 360, 180, 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}});
|
||||
delay(1000);
|
||||
ledTask.startEffect(EffectRandomTwoColorInterpolationConfig{6000, true, 6, rgb2hsv(ColorRGBW{128, 0, 0, 0}),
|
||||
rgb2hsv(ColorRGBW{0, 0, 128, 0}), false, false});
|
||||
ledTask.startEffect(EffectRandomTwoColorInterpolationConfig{6000, true, 6, false, false, rgb2hsv(ColorRGBW{128, 0, 0, 0}),
|
||||
rgb2hsv(ColorRGBW{0, 0, 128, 0})});
|
||||
}
|
||||
if (sn[4] == 0xf0)
|
||||
{
|
||||
@@ -56,8 +57,8 @@ void tag_handler(uint8_t *sn)
|
||||
fox = true;
|
||||
ledTask.startEffect(EffectAlexaSwipeConfig{20, 30, 3 * 360, 3, 180, true, ColorRGBW{0, 0, 255, 0}, ColorRGBW{0, 200, 255, 0}});
|
||||
delay(1000);
|
||||
ledTask.startEffect(EffectRandomTwoColorInterpolationConfig{6000, true, 3, rgb2hsv(ColorRGBW{0, 0, 255, 0}),
|
||||
rgb2hsv(ColorRGBW{0, 200, 255, 0}), false, false});
|
||||
ledTask.startEffect(EffectRandomTwoColorInterpolationConfig{6000, true, 3, false, false, rgb2hsv(ColorRGBW{0, 0, 255, 0}),
|
||||
rgb2hsv(ColorRGBW{0, 200, 255, 0})});
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user