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 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<<CLKPS2); // Switch to 1Mhz for the reminder of the sketch, save power.
|
||||
|
||||
if (measureCount > 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 : "));
|
||||
|
||||
Reference in New Issue
Block a user