File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Arduino_BHY2/examples/AppLowDelay Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Use this sketch if you want to control nicla from
3+ * an external device acting as a host.
4+ * Here, nicla just reacts to external stimuli coming from
5+ * the eslov port or through BLE
6+ *
7+ * NOTE: Remember to choose your Nicla configuration!
8+ * If Nicla is used as a Shield, provide the NICLA_AS_SHIELD parameter.
9+ * If you want to enable just one between I2C and BLE,
10+ * use NICLA_I2C or NICLA_BLE parameters.
11+ *
12+ */
13+
14+ #include " Arduino.h"
15+ #include " Arduino_BHY2.h"
16+
17+ // Set DEBUG to true in order to enable debug print
18+ #define DEBUG false
19+
20+ void setup ()
21+ {
22+ #if DEBUG
23+ Serial.begin (115200 );
24+ BHY2.debug (Serial);
25+ #endif
26+
27+ BHY2.begin ();
28+ }
29+
30+ void loop ()
31+ {
32+ // Update and then sleep only for 1ms
33+ BHY2.update (1 );
34+ }
You can’t perform that action at this time.
0 commit comments