圧力センサー

Dependencies:   mbed

Committer:
takepiyo
Date:
Tue Jul 16 12:19:17 2019 +0000
Revision:
0:f2d2dc1e207d
Child:
1:e567bf7626c6
love

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 0:f2d2dc1e207d 3
takepiyo 0:f2d2dc1e207d 4 int main()
takepiyo 0:f2d2dc1e207d 5 {
takepiyo 0:f2d2dc1e207d 6 BME280 bme280;
takepiyo 0:f2d2dc1e207d 7 Serial pc(USBTX,USBRX);
takepiyo 0:f2d2dc1e207d 8
takepiyo 0:f2d2dc1e207d 9 while(1)
takepiyo 0:f2d2dc1e207d 10 {
takepiyo 0:f2d2dc1e207d 11
takepiyo 0:f2d2dc1e207d 12 pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\n",bme280.getTemperature(),bme280.getPressure(),bme280.getHumidity());
takepiyo 0:f2d2dc1e207d 13 wait(1);
takepiyo 0:f2d2dc1e207d 14 }
takepiyo 0:f2d2dc1e207d 15 }