We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb9c424 commit cf7c275Copy full SHA for cf7c275
images/library_mgr_WifiNINA.png
71.9 KB
src/IMU_ShakeDetector/IMU_ShakeDetector.ino
@@ -17,20 +17,21 @@
17
#include <Arduino_LSM6DS3.h>
18
19
void setup() {
20
- // Initialize Serial for log
21
- Serial.begin(115600);
22
- while (!Serial);
23
-
24
- // Initialize IMU
25
- if (!IMU.begin()) {
26
- Serial.println("Failed to initialize IMU!");
27
- while (1);
28
- }
29
30
// Initialize embedded LED
31
pinMode(13, OUTPUT);
32
digitalWrite(13, LOW);
33
delay(50);
+
+ // Initialize IMU
+ if (!IMU.begin()) {
+ // Failed to initialize IMU, blink the internal LED
+ while (1) {
+ digitalWrite(13, HIGH);
+ delay(100);
+ digitalWrite(13, LOW);
+ }
34
35
}
36
37
void loop() {
0 commit comments