You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 20, 2025. It is now read-only.
The BMI270 is designed for Wear OS by GoogleTM7 and features wrist gestures such as flick in/out, push arm down/pivot up, wrist jiggle/shake that help navigate the smartwatch.
81
+
82
+
See https://support.google.com/wearos/answer/6312406?hl=en
83
+
84
+
For flick-in detection, the user must slowly turn the wrist away from the body (i.e. roll-out shown with a light-grey arrow in) and then quickly bring it back (i.e. roll-in shown with a darker-black arrow in to its original position.
85
+
86
+
For flick-out detection, the user must quickly turn the wrist away from the body (i.e. roll-out shown with a darker-black arrow in above picture) and then slowly bring it back (i.e. roll-in shown with a light-grey arrow in above picture) to its original position.
87
+
88
+
The speed of the roll-out and roll-in movements determine if the user performed a flick-in or a flick-out movement. ::
89
+
90
+
// Start the accelerometer
91
+
MetaWear.mbl_mw_acc_start(device.board);
92
+
// Configure
93
+
MetaWear.mbl_mw_acc_bmi270_wrist_gesture_armside(device.board, 0); // left arm
The BMI270 can detect simple user activities (unknown, still, walking, running) and can send an interrupt if those are changed, e.g. from walking to running or vice versus. ::
114
+
115
+
// Start the accelerometer
116
+
MetaWear.mbl_mw_acc_start(device.board);
117
+
// Get activity signal
118
+
let activity_sig = MetaWear.mbl_mw_acc_bmi270_get_activity_detector_data_signal(device.board);
The BMI270 has a wrist wear wakeup feature that is designed to detect any natural way of user moving the hand to see the watch dial when wearing a classical wrist watch.
130
+
131
+
The feature is intended to be used as wakeup gesture (i.e. for triggering screen-on or screen-off) in wrist wearable devices.
132
+
133
+
This feature has dependency on the device orientation in the user system. Implementation of the feature to detect gesture assumes that the sensor co-ordinate frame is aligned with the device/system co- ordinate frame. The assumed default device/system co-ordinate frame is depicted below.
134
+
135
+
Please refer to `this section <https://mbientlab.com/documents/metawear/cpp/latest/accelerometer__bosch_8h.html#aca2fa97988a33550e20b02c816c6b91f>`_ regarding axis remapping. ::
136
+
137
+
// Start the accelerometer
138
+
MetaWear.mbl_mw_acc_start(device.board);
139
+
// Get gesture signal
140
+
let wrist_sig = MetaWear.mbl_mw_acc_bmi270_get_wrist_detector_data_signal(board);
The BMI270 can detect significant motion (android motion), any motion (high acc motion) or no motion. The accelerometer must be at least running at 25Hz.
161
+
162
+
Detect Any Motion
163
+
^^^^^^^^^^^^^^^^^^^
164
+
The anymotion detection uses the slope between two acceleration signals to detect changes in motion. ::
165
+
166
+
// Start the accelerometer
167
+
MetaWear.mbl_mw_acc_start(device.board);
168
+
// Set any motion config - acc must be on for this
The significant motion interrupt implements the interrupt required for motion detection in Android 4.3 and greater: https://source.android.com/devices/sensors/sensor-types.html#significant_motion.
205
+
A significant motion is a motion due to a change in the user location.
206
+
207
+
Examples of such significant motions are walking or biking, sitting in a moving car, coach or train, etc.
208
+
Examples of situations that does typically not trigger significant motion include phone in pocket and person is stationary or phone is at rest on a table which is in normal office use. . ::
209
+
210
+
// Start the accelerometer
211
+
MetaWear.mbl_mw_acc_start(device.board);
212
+
// Set any motion config - acc must be on for this
The BMI270 accelerometer does not support step counter modes.
268
+
117
269
Reading The Counter
118
270
^^^^^^^^^^^^^^^^^^^
119
271
One way to retrieve step counts is to periodcally read the step counter. To read the step counter, call
@@ -140,6 +292,8 @@ The counter is not enabled by default so you will need enable it by calling
140
292
MetaWear.mbl_mw_acc_start(device.board);
141
293
MetaWear.mbl_mw_datasignal_read(signal);
142
294
295
+
For the BMI270, you can call `mbl_mw_acc_bmi270_enable_step_counter <https://mbientlab.com/documents/metawear/cpp/latest/accelerometer__bosch_8h.html#a48e850d6bdb4b7084c735885465fc1c7>`_ when configuring the board.
296
+
143
297
Using The Detector
144
298
^^^^^^^^^^^^^^^^^^
145
299
Alternatively, you can receive notifications for each step detected by calling
@@ -156,12 +310,28 @@ Alternatively, you can receive notifications for each step detected by calling
Copy file name to clipboardExpand all lines: docs/source/logging.rst
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,16 @@ Once we are done logging, simply call: ::
15
15
16
16
MetaWear.mbl_mw_logging_stop(device.board);
17
17
18
+
Note for the MMS
19
+
----------------
20
+
The MMS (MetaMotionS) board uses NAND flash memory to store data on the device itself. The NAND memory stores data in pages that are 512 entries large. When data is retrieved, it is retrieved in page sized chunks.
21
+
22
+
Before doing a full download of the log memory on the MMS, the final set of data needs to be written to the NAND flash before it can be downloaded as a page. To do this, you must call the function: ::
23
+
24
+
MetaWear.mbl_mw_logging_flush_page(device.board);
25
+
26
+
This should not be called if you are still logging data.
The MMS (MetaMotion) board has a 3V regulator that can be turned on and off for IOs.
70
+
71
+
It is automatically turned on to power the coin vibration motor (if there is one attached), the ambient light sensor, and the LED.
72
+
73
+
However, if you have an external peripheral on the IOs that needs 3V power (such as a buzzer or UV sensor), you can use this function to turn on the power: ::
0 commit comments