Update – Bosch BMP085 Source (Raspberry Pi)
I have updated my code to Read data from a Bosch BMP085 with a Raspberry Pi to correct some bugs reported back to me.
The main bug was that I’d forgotten to close the i2c file at the end of bmp085_ReadUP() – This shouldn’t have caused any problems if you were calling the function once per execution, but if calling it multiple times, it may crash. On the same note, if you are calling the functions multiple times, you may want to move the opening and closing of the i2c file outside of the functions so the files aren’t opened and closed multiple times. Thanks to Radu P for reporting these issues.
It looks like lm-sensors.org is back up now, but if not, you can find a locally hosted copy of smbus.c and smbus.h in this earlier blog post.
Note that I’ve written a number of posts on using this sensor. Here is a link to all posts on the topic.
(more…)





