From 28d8b76162aa8c04d4c705b610fe2e78d9a32864 Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Fri, 22 Jan 2016 17:26:44 +0100 Subject: [PATCH] Bug fix in NexaTellstick issue 8 Former-commit-id: 21b1ac31bca3650db7e71497285e3d2d67ae9581 --- arduino/NexaTellstick/NexaTellstick.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arduino/NexaTellstick/NexaTellstick.ino b/arduino/NexaTellstick/NexaTellstick.ino index df234534..b8b2e274 100644 --- a/arduino/NexaTellstick/NexaTellstick.ino +++ b/arduino/NexaTellstick/NexaTellstick.ino @@ -14,10 +14,6 @@ byte rxBuffer[79]; void setup(){ Serial.begin(9600); - pinMode(8, OUTPUT); digitalWrite(8, LOW); - pinMode(9, OUTPUT); digitalWrite(9, HIGH); - pinMode(6, OUTPUT); digitalWrite(6, LOW); - pinMode(3, OUTPUT); digitalWrite(3, HIGH); }; void loop(){ @@ -102,6 +98,8 @@ bool handleS(byte* buffer, uint8_t startIndex, uint8_t endIndex, bool debug, uin } delay(pause); } + //send confirmation over serial + Serial.println(F("+S")); return true; }; @@ -109,7 +107,7 @@ bool handleT(byte* buffer, uint8_t startIndex, uint8_t endIndex, bool debug, uin //Parse message received from serial uint8_t T_data[72]; //0-188 pulses if(endIndex - startIndex < 5){ - Serial.println("DEBUG: wrong size!"); + //Serial.println("DEBUG: wrong size!"); return false; } uint8_t buff_p = startIndex; @@ -150,6 +148,8 @@ bool handleT(byte* buffer, uint8_t startIndex, uint8_t endIndex, bool debug, uin delay(pause); } } + //send confirmation over serial + Serial.println(F("+T")); return parseRxBuffer(buffer, buff_p, endIndex, debug, repeat, pause); };