Bmp280
Dependencies: BME280 BMP280 MS5803_14BA
Revision 0:81a749387ba2, committed 2017-11-08
- Comitter:
- andrewbates11
- Date:
- Wed Nov 08 15:31:46 2017 +0000
- Commit message:
- Bmp280 testing
Changed in this revision
diff -r 000000000000 -r 81a749387ba2 BME280.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BME280.lib Wed Nov 08 15:31:46 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/MACRUM/code/BME280/#c1f1647004c4
diff -r 000000000000 -r 81a749387ba2 BMP280.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BMP280.lib Wed Nov 08 15:31:46 2017 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/users/12104404/code/BMP280/#c72b726c7dc9
diff -r 000000000000 -r 81a749387ba2 MS5803_14BA.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MS5803_14BA.lib Wed Nov 08 15:31:46 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/frada/code/MS5803_14BA/#373f735e50e2
diff -r 000000000000 -r 81a749387ba2 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Nov 08 15:31:46 2017 +0000 @@ -0,0 +1,34 @@ +/* +#include "mbed.h" +#include "MS5803_14BA.h" + +// Serial comms +Serial pc(USBTX, USBRX); + +MS5803_14BA ps = MS5803_14BA(p26,p27, MS5803_ADDRC_H); + +int main() { + while(1) { + ps.convert(); + pc.printf("temp: %f, pressure: %f\n", ps.temperature, ps.pressure); + wait(1); + } +} +*/ + + +#include "mbed.h" +#include "BMP280.h" + +Serial pc(USBTX, USBRX); + + BMP280 sensor(p26, p27); + + int main() { + while(1) { + pc.printf("%04.2f hPa \n", sensor.getPressure()); + wait(1); + } + } + +
diff -r 000000000000 -r 81a749387ba2 mbed-os.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Nov 08 15:31:46 2017 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#6e0d01cd13e8aca7bf4d697c3699ec9225386881