From a26af52b6d2d3aff5348122db327d80f6083fa75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=B8rch?= Date: Sat, 25 Apr 2015 22:11:38 +0200 Subject: [PATCH] Added versioning info to serial output (for production verification) --- .../examples/MysensorMicro/MysensorMicro.ino | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino index f78d819..5c8ca71 100644 --- a/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino +++ b/libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino @@ -18,6 +18,8 @@ // Define a static node address, remove if you want auto address assignment //#define NODE_ADDRESS 3 +#define RELEASE "1.1" + // Child sensor ID's #define CHILD_ID_TEMP 1 #define CHILD_ID_HUM 2 @@ -66,6 +68,10 @@ void setup() { digitalWrite(LED_PIN, LOW); Serial.begin(115200); + Serial.print(F("Sensebender Micro FW ")); + Serial.print(RELEASE); + Serial.flush(); + // First check if we should boot into test mode pinMode(TEST_PIN,INPUT); @@ -74,7 +80,7 @@ void setup() { digitalWrite(TEST_PIN,LOW); digitalWrite(LED_PIN, HIGH); - + #ifdef NODE_ADDRESS gw.begin(NULL, NODE_ADDRESS, false); #else @@ -84,8 +90,9 @@ void setup() { digitalWrite(LED_PIN, LOW); humiditySensor.begin(); - - gw.sendSketchInfo("Sensebender Micro", "1.0"); + Serial.flush(); + Serial.println(F(" - Online!")); + gw.sendSketchInfo("Sensebender Micro", RELEASE); gw.present(CHILD_ID_TEMP,S_TEMP); gw.present(CHILD_ID_HUM,S_HUM); @@ -105,8 +112,7 @@ void loop() { // This allows us to print debug messages on startup (as serial port is dependend on oscilator settings). if (measureCount == 5) switchClock(1< FORCE_TRANSMIT_INTERVAL - ) { // force a transmission + if (measureCount > FORCE_TRANSMIT_INTERVAL) { // force a transmission forceTransmit = true; measureCount = 0; } @@ -213,7 +219,7 @@ void testMode() byte tests = 0; digitalWrite(LED_PIN, HIGH); // Turn on LED. - + Serial.println(F(" - TestMode")); Serial.println(F("Testing peripherals!")); Serial.flush(); Serial.print(F("-> SI7021 : "));