-
Notifications
You must be signed in to change notification settings - Fork 32
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
readTemperature() Returns Nonsensical Values (Nano 33 IoT) #41
Comments
Hi @ryanohoro. Thanks for your report.
Arduino provides a different library named "Arduino_LSM6DSOX" specifically for that chip. You can install it from the Arduino Library Manager. Please give it a try. https://www.arduino.cc/reference/en/libraries/arduino_lsm6dsox/ Even though the description mentions the Nano RP2040 Connect board specifically, the library metadata indicates it is compatible with boards of different architectures as well. I don't happen to have a Nano 33 IoT board with the LSM6DSOX chip, or a LSM6DSOX I can connect to one of my SAMD boards so I can test it out, but I think it is worth a try. |
Thanks so much @per1234 ! I'll use the Arduino_LSM6DSOX library since it's more suitable for my Nano. Shame that this isn't documented on the Nano 33 IoT product pages, and that it's actually kind of hard to determine which chip you have, and therefore which library to use. Edit: I've sent a tech support request to Arduino about the IMU switch. |
Update from tech support:
|
Running SimpleTempSensor results in readTemperature() returning nonsensical values that change based on the temperature.
The root cause is that the original part the Nano 33 IoT shipped with, the LSM6DS3 (Chip marked SH) is no longer manufactured, and other parts from this family are being shipped on these boards. Mine has a LSM6DSOX (Chip marked S4). These parts have different values for temperature sensitivity, which affects how the raw value is converted into degrees Celsius.
Arduino_LSM6DS3/src/LSM6DS3.cpp
Line 162 in 2640521
Changing the formula results in accurate temperature values
t = data[0] / 256.0 + 25;
Unfortunately, I'm not sure how to programmatically determine which temperature setting value is appropriate.
The text was updated successfully, but these errors were encountered: