@@ -81,7 +81,7 @@ void setup() {
81
81
82
82
humiditySensor.begin ();
83
83
84
- gw.sendSketchInfo (" EnvironmentSensor " , " 1.0" );
84
+ gw.sendSketchInfo (" MysensorMicro " , " 1.0" );
85
85
86
86
gw.present (CHILD_ID_TEMP,S_TEMP);
87
87
gw.present (CHILD_ID_HUM,S_HUM);
@@ -205,8 +205,9 @@ void testMode()
205
205
digitalWrite (LED_PIN, HIGH); // Turn on LED.
206
206
207
207
Serial.println (F (" Testing peripherals!" ));
208
+ Serial.flush ();
208
209
Serial.print (F (" -> SI7021 : " ));
209
- delay ( 100 );
210
+ Serial. flush ( );
210
211
211
212
if (humiditySensor.begin ())
212
213
{
@@ -217,10 +218,10 @@ void testMode()
217
218
{
218
219
Serial.println (F (" failed!" ));
219
220
}
220
- delay ( 100 );
221
+ Serial. flush ( );
221
222
222
223
Serial.print (F (" -> Flash : " ));
223
- delay ( 100 );
224
+ Serial. flush ( );
224
225
if (flash.initialize ())
225
226
{
226
227
Serial.println (F (" ok!" ));
@@ -230,15 +231,17 @@ delay(100);
230
231
{
231
232
Serial.println (F (" failed!" ));
232
233
}
233
- delay (100 );
234
+ Serial.flush ();
235
+
234
236
235
- Serial.println (F (" -> SHA204 : " ));
237
+ Serial.print (F (" -> SHA204 : " ));
236
238
ret_code = sha204.sha204c_wakeup (rx_buffer);
239
+ Serial.flush ();
237
240
if (ret_code != SHA204_SUCCESS)
238
241
{
239
242
Serial.print (F (" Failed to wake device. Response: " )); Serial.println (ret_code, HEX);
240
243
}
241
-
244
+ Serial. flush ();
242
245
if (ret_code == SHA204_SUCCESS)
243
246
{
244
247
ret_code = sha204.getSerialNumber (rx_buffer);
@@ -248,7 +251,7 @@ delay(100);
248
251
}
249
252
else
250
253
{
251
- Serial.print (F (" Device serial: " ));
254
+ Serial.print (F (" Ok ( serial : " ));
252
255
for (int i=0 ; i<9 ; i++)
253
256
{
254
257
if (rx_buffer[i] < 0x10 )
@@ -257,12 +260,12 @@ delay(100);
257
260
}
258
261
Serial.print (rx_buffer[i], HEX);
259
262
}
260
- Serial.println ();
263
+ Serial.println (" ) " );
261
264
tests ++;
262
265
}
263
266
264
267
}
265
-
268
+ Serial. flush ();
266
269
267
270
Serial.println (F (" Test finished" ));
268
271
0 commit comments