Skip to content

Commit 985f9c3

Browse files
committed
Moved static strings for Serial.println() to flash storage
1 parent adeca1c commit 985f9c3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Default sensor sketch for MySensor Micro module
22
// Act as a temperature / humidity sensor by default.
33
//
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
55
//
66
// Battery voltage is repported as child sensorId 199, as well as battery percentage
77

@@ -193,16 +193,16 @@ void testMode()
193193
{
194194
byte tests = 0;
195195

196-
Serial.println("Testing peripherals!");
196+
Serial.println(F("Testing peripherals!"));
197197

198198
if (humiditySensor.begin())
199199
{
200-
Serial.println("Si7021 ok!");
200+
Serial.println(F("Si7021 ok!"));
201201
tests ++;
202202
}
203203
else
204204
{
205-
Serial.println("---> Si7021 FAILED!");
205+
Serial.println(F("---> Si7021 FAILED!"));
206206
}
207207

208208
if (flash.initialize())
@@ -212,14 +212,14 @@ void testMode()
212212
}
213213
else
214214
{
215-
Serial.println("---> flash failed!");
215+
Serial.println(F("---> flash failed!"));
216216
}
217217

218-
Serial.println("Test finished");
218+
Serial.println(F("Test finished"));
219219

220220
if (tests == 2)
221221
{
222-
Serial.println("Selftest ok!");
222+
Serial.println(F("Selftest ok!"));
223223
while (1) // Blink OK pattern!
224224
{
225225
digitalWrite(LED_PIN, HIGH);
@@ -230,7 +230,7 @@ void testMode()
230230
}
231231
else
232232
{
233-
Serial.println("----> Selftest failed!");
233+
Serial.println(F("----> Selftest failed!"));
234234
while (1) // Blink FAILED pattern! Rappidly blinking..
235235
{
236236
digitalWrite(LED_PIN, HIGH);

0 commit comments

Comments
 (0)