18
18
// Define a static node address, remove if you want auto address assignment
19
19
// #define NODE_ADDRESS 3
20
20
21
+ #define RELEASE " 1.1"
22
+
21
23
// Child sensor ID's
22
24
#define CHILD_ID_TEMP 1
23
25
#define CHILD_ID_HUM 2
@@ -66,6 +68,10 @@ void setup() {
66
68
digitalWrite (LED_PIN, LOW);
67
69
68
70
Serial.begin (115200 );
71
+ Serial.print (F (" Sensebender Micro FW " ));
72
+ Serial.print (RELEASE);
73
+ Serial.flush ();
74
+
69
75
// First check if we should boot into test mode
70
76
71
77
pinMode (TEST_PIN,INPUT);
@@ -74,7 +80,7 @@ void setup() {
74
80
75
81
digitalWrite (TEST_PIN,LOW);
76
82
digitalWrite (LED_PIN, HIGH);
77
-
83
+
78
84
#ifdef NODE_ADDRESS
79
85
gw.begin (NULL , NODE_ADDRESS, false );
80
86
#else
@@ -84,8 +90,9 @@ void setup() {
84
90
digitalWrite (LED_PIN, LOW);
85
91
86
92
humiditySensor.begin ();
87
-
88
- gw.sendSketchInfo (" Sensebender Micro" , " 1.0" );
93
+ Serial.flush ();
94
+ Serial.println (F (" - Online!" ));
95
+ gw.sendSketchInfo (" Sensebender Micro" , RELEASE);
89
96
90
97
gw.present (CHILD_ID_TEMP,S_TEMP);
91
98
gw.present (CHILD_ID_HUM,S_HUM);
@@ -105,8 +112,7 @@ void loop() {
105
112
// This allows us to print debug messages on startup (as serial port is dependend on oscilator settings).
106
113
if (measureCount == 5 ) switchClock (1 <<CLKPS2); // Switch to 1Mhz for the reminder of the sketch, save power.
107
114
108
- if (measureCount > FORCE_TRANSMIT_INTERVAL
109
- ) { // force a transmission
115
+ if (measureCount > FORCE_TRANSMIT_INTERVAL) { // force a transmission
110
116
forceTransmit = true ;
111
117
measureCount = 0 ;
112
118
}
@@ -213,7 +219,7 @@ void testMode()
213
219
byte tests = 0 ;
214
220
215
221
digitalWrite (LED_PIN, HIGH); // Turn on LED.
216
-
222
+ Serial. println ( F ( " - TestMode " ));
217
223
Serial.println (F (" Testing peripherals!" ));
218
224
Serial.flush ();
219
225
Serial.print (F (" -> SI7021 : " ));
0 commit comments