Skip to content

Commit 341043b

Browse files
committed
Merge pull request #5 from andydoro/master
fix for ESP8266 boards Serial
2 parents 9e720d4 + ccc4562 commit 341043b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/lsm9doftest/lsm9doftest.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ void setupSensor()
3434

3535
void setup()
3636
{
37-
while (!Serial); // flora & leonardo
38-
37+
#ifndef ESP8266
38+
while (!Serial); // will pause Zero, Leonardo, etc until serial console opens
39+
#endif
3940
Serial.begin(9600);
4041
Serial.println("LSM raw read demo");
4142

examples/sensorapi/sensorapi.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ void configureSensor(void)
142142
/**************************************************************************/
143143
void setup(void)
144144
{
145-
while (!Serial); // wait for flora/leonardo
146-
145+
#ifndef ESP8266
146+
while (!Serial); // will pause Zero, Leonardo, etc until serial console opens
147+
#endif
147148
Serial.begin(9600);
148149
Serial.println(F("LSM9DS0 9DOF Sensor Test")); Serial.println("");
149150

0 commit comments

Comments
 (0)