Go Down

Topic: CurieImu readTemperature() incorrect function (Read 184 times) previous topic - next topic

ericthemantis

I was trying out the CurieImu.readTemperature() function that I saw listed on the CurieImu reference page. It was returning the error 'class CurieImuClass' has no member named 'readTemperature'. I checked the CurieImu.h file, which led me to the BMI160.h file. The correct function is getTemperature().

pert

There is a new version of the CurieImu library(they renamed it CurieIMU and left the version number at 1.0 just to be extra confusing) included with the new version of Intel Curie Boards(1.0.5). You can install it using Tools > Board > Boards Manager... > Intel Curie Boards > Update. The new version of the library does have a readTemperature() function but all it does is call getTemperature().

ericthemantis

Good call. I had 1.0.4. Yep, readTemperature() and getTemperature() both work with 1.0.5. Also had to change my #include to "CurieIMU".

GregorioW

Hello,

There is another thing with the reference regarding CurieIMU.readTemperature() function.

According to the formula, the temperature range would be from 22 to 24 °C. This doesn't seem fine. If it was to be calculated according to BMI160 datasheet, it would be probably
Code: [Select]
tempCelsius = rawTemperature / 512.0 + 23.0;
Can anybody check it?

Best regards,
GregorioW


PS  This is my first post here, I hope I will be able to contribute something more at some point. Thanks for all the support so far!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy