Robert Taylor
/
sht31_II
hello
Diff: main.cpp
- Revision:
- 0:35a52271b5b4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 20 16:51:53 2016 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "Sht31/Sht31.h" + +Sht31 sht31(D14, D15); + +int main() +{ + printf("Hello\r\n"); + while (true) { + float t = sht31.readTemperature(); + float h = sht31.readHumidity(); + printf("Temperature [ %3.2f F ]\r\n", t); + printf("Humidity [ %3.2f %% ]\r\n\n", h); + wait(5); + } +}