Skip to content
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

add BME280 SPI/I2C sensor support #2

Open
kalon33 opened this issue Jan 20, 2018 · 3 comments
Open

add BME280 SPI/I2C sensor support #2

kalon33 opened this issue Jan 20, 2018 · 3 comments

Comments

@kalon33
Copy link

kalon33 commented Jan 20, 2018

Please add BME280 temperature/humidity/pressure sensor support, using both SPI or I2C (or I2C only).

That would be very nice to support this very common sensor and add an example to use it as a demo of I2C sensor interfacing.

@Ebiroll
Copy link

Ebiroll commented Feb 13, 2018

I implemented BME280 support here, https://github.com/Ebiroll/RAK811_BreakBoard/tree/master/lib/obme280
Use like this
i2c_bme280_begin();
temp=i2c_bme280_read_temp();
pressure=i2c_bme280_read_pressure();
rh=i2c_bme280_read_rh();
int itemp=temp;
int irh=rh;
printf("RH %2f Temp %2f , pressure %2f\r\n",rh,temp,pressure);
printf("RH %d Temp %d \r\n",irh,itemp);
It also uses forced mode that will save some power,
Use i2c_bme280_force_readings( void ); to force new readings and put BME280 to sleep again.

@kalon33
Copy link
Author

kalon33 commented Feb 13, 2018 via email

@Ebiroll
Copy link

Ebiroll commented Feb 13, 2018

Yes, sleepmode is still work in progress and the bme280 code needs more testing. We will see what we can do with sleepmode. Feedback is welcome. Here is another interesting board http://badgerboard.io but I am hoping that RAK will make a board that is optimized for battery operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants