圧力センサー

Dependencies:   mbed

Committer:
takepiyo
Date:
Tue Jul 16 12:29:17 2019 +0000
Revision:
3:cec0bf691696
Parent:
2:73d4f5cb4f48
Child:
4:ad09eb6ed2cb
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takepiyo 0:f2d2dc1e207d 1 #include "mbed.h"
takepiyo 0:f2d2dc1e207d 2 #include "bme280.h"
takepiyo 2:73d4f5cb4f48 3 //test
takepiyo 3:cec0bf691696 4
takepiyo 3:cec0bf691696 5
takepiyo 0:f2d2dc1e207d 6 int main()
takepiyo 0:f2d2dc1e207d 7 {
takepiyo 0:f2d2dc1e207d 8 BME280 bme280;
takepiyo 0:f2d2dc1e207d 9 Serial pc(USBTX,USBRX);
takepiyo 0:f2d2dc1e207d 10
takepiyo 0:f2d2dc1e207d 11 while(1)
takepiyo 0:f2d2dc1e207d 12 {
takepiyo 0:f2d2dc1e207d 13
takepiyo 0:f2d2dc1e207d 14 pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\n",bme280.getTemperature(),bme280.getPressure(),bme280.getHumidity());
takepiyo 0:f2d2dc1e207d 15 wait(1);
takepiyo 0:f2d2dc1e207d 16 }
takepiyo 0:f2d2dc1e207d 17 }