1
1
// Default sensor sketch for MySensor Micro module
2
2
// Act as a temperature / humidity sensor by default.
3
3
//
4
- // If A1 is held low while powering on, it will clear eeprom (and thereby the stored nodeid)
4
+ // If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals
5
5
//
6
6
// Battery voltage is repported as child sensorId 199, as well as battery percentage
7
7
@@ -193,16 +193,16 @@ void testMode()
193
193
{
194
194
byte tests = 0 ;
195
195
196
- Serial.println (" Testing peripherals!" );
196
+ Serial.println (F ( " Testing peripherals!" ) );
197
197
198
198
if (humiditySensor.begin ())
199
199
{
200
- Serial.println (" Si7021 ok!" );
200
+ Serial.println (F ( " Si7021 ok!" ) );
201
201
tests ++;
202
202
}
203
203
else
204
204
{
205
- Serial.println (" ---> Si7021 FAILED!" );
205
+ Serial.println (F ( " ---> Si7021 FAILED!" ) );
206
206
}
207
207
208
208
if (flash.initialize ())
@@ -212,14 +212,14 @@ void testMode()
212
212
}
213
213
else
214
214
{
215
- Serial.println (" ---> flash failed!" );
215
+ Serial.println (F ( " ---> flash failed!" ) );
216
216
}
217
217
218
- Serial.println (" Test finished" );
218
+ Serial.println (F ( " Test finished" ) );
219
219
220
220
if (tests == 2 )
221
221
{
222
- Serial.println (" Selftest ok!" );
222
+ Serial.println (F ( " Selftest ok!" ) );
223
223
while (1 ) // Blink OK pattern!
224
224
{
225
225
digitalWrite (LED_PIN, HIGH);
@@ -230,7 +230,7 @@ void testMode()
230
230
}
231
231
else
232
232
{
233
- Serial.println (" ----> Selftest failed!" );
233
+ Serial.println (F ( " ----> Selftest failed!" ) );
234
234
while (1 ) // Blink FAILED pattern! Rappidly blinking..
235
235
{
236
236
digitalWrite (LED_PIN, HIGH);
0 commit comments