fix minor bug in sketch.ino
This commit is contained in:
parent
cce0df036f
commit
588948161a
2 changed files with 4 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
*/node_modules/*
|
*/node_modules/*
|
||||||
arduino/.build/*
|
arduino/.build/*
|
||||||
|
npm-debug.log
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
RCSwitch mySwitch = RCSwitch();
|
RCSwitch mySwitch = RCSwitch();
|
||||||
|
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int incomingByte = 0;
|
|
||||||
boolean on = false;
|
boolean on = false;
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
|
@ -15,8 +14,8 @@ void setup()
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
if(Serial.available()) {
|
if(Serial.available()) {
|
||||||
incomingByte = Serial.read();
|
mode = Serial.read();
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
|
|
||||||
case 126:
|
case 126:
|
||||||
|
@ -39,4 +38,4 @@ void loop()
|
||||||
void controlRCOutlets(const char* sCodeWord) {
|
void controlRCOutlets(const char* sCodeWord) {
|
||||||
mySwitch.sendTriState(sCodeWord);
|
mySwitch.sendTriState(sCodeWord);
|
||||||
delay(1000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue