From 588948161ad7dcfdfe20da350623f88e5d9d6f44 Mon Sep 17 00:00:00 2001 From: Stefan Sterz Date: Wed, 13 Jan 2016 09:55:37 +0100 Subject: [PATCH] fix minor bug in sketch.ino --- .gitignore | 1 + arduino/src/sketch.ino | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3c988fc..0807b17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ */node_modules/* arduino/.build/* +npm-debug.log diff --git a/arduino/src/sketch.ino b/arduino/src/sketch.ino index e0d60e4..c34ed2d 100644 --- a/arduino/src/sketch.ino +++ b/arduino/src/sketch.ino @@ -3,7 +3,6 @@ RCSwitch mySwitch = RCSwitch(); int mode = 0; -int incomingByte = 0; boolean on = false; void setup() @@ -15,8 +14,8 @@ void setup() void loop() { if(Serial.available()) { - incomingByte = Serial.read(); - + mode = Serial.read(); + switch (mode) { case 126: @@ -39,4 +38,4 @@ void loop() void controlRCOutlets(const char* sCodeWord) { mySwitch.sendTriState(sCodeWord); delay(1000); -} \ No newline at end of file +}