圧力センサー
Dependencies: mbed
main.cpp@4:ad09eb6ed2cb, 2019-07-16 (annotated)
- Committer:
- takepiyo
- Date:
- Tue Jul 16 12:29:39 2019 +0000
- Revision:
- 4:ad09eb6ed2cb
- Parent:
- 3:cec0bf691696
- Child:
- 5:9cdca47368e5
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takepiyo | 0:f2d2dc1e207d | 1 | #include "mbed.h" |
takepiyo | 0:f2d2dc1e207d | 2 | #include "bme280.h" |
takepiyo | 4:ad09eb6ed2cb | 3 | //おっぱい |
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 | } |