hank tsou
/
BME280_Hello
Hello program for BME280 library
Fork of BME280_Hello by
Revision 4:206a558ebb2a, committed 2016-06-20
- Comitter:
- hank51017
- Date:
- Mon Jun 20 07:11:29 2016 +0000
- Parent:
- 3:710f0b2843e4
- Commit message:
- bme280 share
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jun 26 06:42:06 2015 +0000 +++ b/main.cpp Mon Jun 20 07:11:29 2016 +0000 @@ -9,10 +9,13 @@ BME280 sensor(I2C_SDA, I2C_SCL); #endif + int main() { + while(1) { - pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); + + printf("%2.2f degC, %04.2f hPa, %2.2f %%\r\n", (sensor.getTemperature()-32)*5.0/9.0, sensor.getPressure(), sensor.getHumidity()); wait(1); } }
--- a/mbed.bld Fri Jun 26 06:42:06 2015 +0000 +++ b/mbed.bld Mon Jun 20 07:11:29 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file