Added versioning info to serial output (for production verification)
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
// Define a static node address, remove if you want auto address assignment
|
// Define a static node address, remove if you want auto address assignment
|
||||||
//#define NODE_ADDRESS 3
|
//#define NODE_ADDRESS 3
|
||||||
|
|
||||||
|
#define RELEASE "1.1"
|
||||||
|
|
||||||
// Child sensor ID's
|
// Child sensor ID's
|
||||||
#define CHILD_ID_TEMP 1
|
#define CHILD_ID_TEMP 1
|
||||||
#define CHILD_ID_HUM 2
|
#define CHILD_ID_HUM 2
|
||||||
@@ -66,6 +68,10 @@ void setup() {
|
|||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
|
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
Serial.print(F("Sensebender Micro FW "));
|
||||||
|
Serial.print(RELEASE);
|
||||||
|
Serial.flush();
|
||||||
|
|
||||||
// First check if we should boot into test mode
|
// First check if we should boot into test mode
|
||||||
|
|
||||||
pinMode(TEST_PIN,INPUT);
|
pinMode(TEST_PIN,INPUT);
|
||||||
@@ -84,8 +90,9 @@ void setup() {
|
|||||||
digitalWrite(LED_PIN, LOW);
|
digitalWrite(LED_PIN, LOW);
|
||||||
|
|
||||||
humiditySensor.begin();
|
humiditySensor.begin();
|
||||||
|
Serial.flush();
|
||||||
gw.sendSketchInfo("Sensebender Micro", "1.0");
|
Serial.println(F(" - Online!"));
|
||||||
|
gw.sendSketchInfo("Sensebender Micro", RELEASE);
|
||||||
|
|
||||||
gw.present(CHILD_ID_TEMP,S_TEMP);
|
gw.present(CHILD_ID_TEMP,S_TEMP);
|
||||||
gw.present(CHILD_ID_HUM,S_HUM);
|
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).
|
// This allows us to print debug messages on startup (as serial port is dependend on oscilator settings).
|
||||||
if (measureCount == 5) switchClock(1<<CLKPS2); // Switch to 1Mhz for the reminder of the sketch, save power.
|
if (measureCount == 5) switchClock(1<<CLKPS2); // Switch to 1Mhz for the reminder of the sketch, save power.
|
||||||
|
|
||||||
if (measureCount > FORCE_TRANSMIT_INTERVAL
|
if (measureCount > FORCE_TRANSMIT_INTERVAL) { // force a transmission
|
||||||
) { // force a transmission
|
|
||||||
forceTransmit = true;
|
forceTransmit = true;
|
||||||
measureCount = 0;
|
measureCount = 0;
|
||||||
}
|
}
|
||||||
@@ -213,7 +219,7 @@ void testMode()
|
|||||||
byte tests = 0;
|
byte tests = 0;
|
||||||
|
|
||||||
digitalWrite(LED_PIN, HIGH); // Turn on LED.
|
digitalWrite(LED_PIN, HIGH); // Turn on LED.
|
||||||
|
Serial.println(F(" - TestMode"));
|
||||||
Serial.println(F("Testing peripherals!"));
|
Serial.println(F("Testing peripherals!"));
|
||||||
Serial.flush();
|
Serial.flush();
|
||||||
Serial.print(F("-> SI7021 : "));
|
Serial.print(F("-> SI7021 : "));
|
||||||
|
|||||||
Reference in New Issue
Block a user