summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2018-01-31 11:52:45 +1100
committerStanley Huang <stanleyhuangyc@gmail.com>2018-01-31 11:52:45 +1100
commit25d95246ea97492ac0979d27e807ff3e8e3a9775 (patch)
tree8876a3e77c3590f47203d2bf0b07aa0b9af9c8ad
parentec35ee0fab747dd7a7ef9f0996970b094a00d4f3 (diff)
download2021-arduino-obd-25d95246ea97492ac0979d27e807ff3e8e3a9775.tar.gz
2021-arduino-obd-25d95246ea97492ac0979d27e807ff3e8e3a9775.tar.bz2
2021-arduino-obd-25d95246ea97492ac0979d27e807ff3e8e3a9775.zip
Update
-rw-r--r--libraries/OBD2UART/examples/orientation_demo/orientation_demo.ino9
1 files changed, 4 insertions, 5 deletions
diff --git a/libraries/OBD2UART/examples/orientation_demo/orientation_demo.ino b/libraries/OBD2UART/examples/orientation_demo/orientation_demo.ino
index 923c6ac..e04949c 100644
--- a/libraries/OBD2UART/examples/orientation_demo/orientation_demo.ino
+++ b/libraries/OBD2UART/examples/orientation_demo/orientation_demo.ino
@@ -22,7 +22,6 @@ HardwareSerial Serial1(1);
#endif
COBD obd;
-bool hasMEMS;
void setup()
{
@@ -44,11 +43,11 @@ void setup()
}
// initialize MEMS with sensor fusion enabled
- hasMEMS = obd.memsInit(true);
- mySerial.print("MEMS:");
- mySerial.println(hasMEMS ? "OK" : "NO");
+ bool hasMEMS = obd.memsInit(true);
+ mySerial.print("Motion sensor is ");
+ mySerial.println(hasMEMS ? "present" : "not present");
if (!hasMEMS) {
- for (;;);
+ for (;;) delay(1000);
}
}