|
|
|
@ -266,6 +266,12 @@ bool switchHandler(const HomieRange& range, const String& value) {
|
|
|
|
|
swSer.write(commandbytes[1]);
|
|
|
|
|
swSer.write(commandbytes[2]);
|
|
|
|
|
swSer.write(commandbytes[3]);
|
|
|
|
|
// Zeige aktuelle Quelle auf dem Strip an
|
|
|
|
|
strip.None();
|
|
|
|
|
strip.clear();
|
|
|
|
|
strip.show();
|
|
|
|
|
strip.colorBox(commandbytes[1]-128, strip.Color(255, 255, 255));
|
|
|
|
|
strip.show();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -338,6 +344,7 @@ void loop() {
|
|
|
|
|
ArduinoOTA.handle();
|
|
|
|
|
|
|
|
|
|
while (swSer.available() > 0) {
|
|
|
|
|
ArduinoOTA.handle();
|
|
|
|
|
lastMillis = millis();
|
|
|
|
|
int r1 = swSer.read();
|
|
|
|
|
Serial.print(currentnumber);
|
|
|
|
@ -363,15 +370,8 @@ void loop() {
|
|
|
|
|
// Zeige aktuelle Quelle auf dem Strip an
|
|
|
|
|
strip.None();
|
|
|
|
|
strip.clear();
|
|
|
|
|
// for (int j=0;j<NUMPIXELS;j++)
|
|
|
|
|
// {
|
|
|
|
|
// strip.setPixelColor(j, strip.Color(0, 0, 0));
|
|
|
|
|
// }
|
|
|
|
|
strip.show();
|
|
|
|
|
strip.colorBox(inputbytes[1]-128, strip.Color(255, 255, 255));
|
|
|
|
|
// strip.setPixelColor((inputbytes[1]-128)*3, strip.Color(255, 0, 0));
|
|
|
|
|
// strip.setPixelColor((inputbytes[1]-128)*3+1, strip.Color(255, 0, 0));
|
|
|
|
|
// strip.setPixelColor((inputbytes[1]-128)*3+2, strip.Color(255, 0, 0));
|
|
|
|
|
strip.show();
|
|
|
|
|
|
|
|
|
|
currentnumber = 0;
|
|
|
|
|