Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
JackRabbit Newbie Joined: 21/07/2018 Location: United StatesPosts: 14
Posted: 01:12am 20 Jan 2019
Copy link to clipboard
Print this post
Does anyone have code to read and convert the Bosch BMP280 Baro and Temp sensor output? I did search and found some circuit discussion but didn't find any code.
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6283
Posted: 01:57am 20 Jan 2019
Copy link to clipboard
Print this post
I think the BMP280 can use the same code as the BMP180 which can use the same code as the BMP085 I am using my BMP085 code for a BMP180 on the MMEdit test server without issues.
This assumes you use I2C and set the address jumper to suit.
You should be able to find plenty of BMP085 code on the forum.
JackRabbit Newbie Joined: 21/07/2018 Location: United StatesPosts: 14
Posted: 02:54am 20 Jan 2019
Copy link to clipboard
Print this post
I looked at the BMP180 datasheet and unfortunately it appears the BMP280 interface is somewhat different, especially in the value correction/conversion math.
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1003
Posted: 05:54am 20 Jan 2019
Copy link to clipboard
Print this post
The code below tests for both a BMP280 and BME280 on either of the I2C addresses used. It is based on code on the forum here somewhere (Lewis weather station maybe) If you ignore the humidity part it should give you a starting point.