-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AE-91] SensorID 70 SENSOR_ID_DEVICE_ORI_WU
initially gives value of 0.000
regardless of orientation
#102
Comments
@marqdevx @i-herrera can you also confirm this behaviour in your evaluations? |
SENSOR_ID_DEVICE_ORI_WU
initially gives value of 0.000
regardless of orientationSENSOR_ID_DEVICE_ORI_WU
initially gives value of 0.000
regardless of orientation
Hi
|
Hello @bstbud 👋 🙂 Applying your fix (adding a delay of 1000 ms) does indeed eliminate the initial
I can also confirm that a delay of 100ms is also sufficent to reliably prevent the initial zero value for sensor ID 70. |
There are three problems with this solution:
Following the call on Monday, is there a solution the Bosch team can provide for this? |
An example for points 2 (switching between sensor IDs) and 3 (seemingly arbitrary delay) in the comment above: this is the output when the sketch calls sensor IDs 69 (non wake up) and 70 (wake up)
When a delay of 50ms is included, this eliminates the zero value for sensor ID 69 but not 70.
|
Hi @aliphys Thanks for your update as to the confirmation that the issue could be resolved by adding proper delays. Option 2 is better, I think. |
Hello @bstbud , |
Modified original sketch to use the Sketch with `sensors[checkID].dataAvaliable()` method
This error is produced.
This method should work for all sensorIDs according to |
Describe the Problem
😔 Polling sensor ID 70
SENSOR_ID_DEVICE_ORI_WU
gives an inital reading of 0.000 regardless of actual orientation. Additionally, (from a user perspective) the datatype should beint
. See table 79 in datasheet.nicla-sense-me-fw/Arduino_BHY2/src/sensors/SensorID.h
Line 49 in b442527
To reproduce
Output:
Expected behaviour
🙂 Initial value is not zero. Either the correct value is given (e.g.
3
), or an output is given that does not correspond to the expected data (e.g.-1
)🙂 Data type is
int
(so3
not3.000
)Arduino CLI version
0.32.3 - arduino/arduino-cli@2661f5d
Operating system
Windows 10
Additional Context
The initial value of multiple sensors (including ) is also zero. However, given that the values of sensor ID
SENSOR_ID_DEVICE_ORI_WU
are discrete it is difficult to discern if the 0 relates to the sensor warming up (i.e. reading the value from the FIFO buffer) or if it is the actual orientation beingportrait upright
.nicla-sense-me-fw/Arduino_BHY2/src/sensors/SensorID.h
Line 163 in b442527
Additionally, the value of the sensor orientation is not documented in Arduino documentation. The only way a user may know is through the BHI260 datasheet. Even then, it is not clear if the same conventions are used between the BHI260 datasheet and the Arduino_BHY2 library.
The text was updated successfully, but these errors were encountered: