hello

Dependencies:   Sht31 mbed

Committer:
GeofferyOmlette
Date:
Thu Jul 21 15:31:14 2016 +0000
Revision:
1:683b53ff0239
Parent:
0:35a52271b5b4
hello

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GeofferyOmlette 0:35a52271b5b4 1 #include "mbed.h"
GeofferyOmlette 0:35a52271b5b4 2 #include "Sht31/Sht31.h"
GeofferyOmlette 0:35a52271b5b4 3
GeofferyOmlette 0:35a52271b5b4 4 Sht31 sht31(D14, D15);
GeofferyOmlette 0:35a52271b5b4 5
GeofferyOmlette 0:35a52271b5b4 6 int main()
GeofferyOmlette 0:35a52271b5b4 7 {
GeofferyOmlette 0:35a52271b5b4 8 printf("Hello\r\n");
GeofferyOmlette 0:35a52271b5b4 9 while (true) {
GeofferyOmlette 0:35a52271b5b4 10 float t = sht31.readTemperature();
GeofferyOmlette 0:35a52271b5b4 11 float h = sht31.readHumidity();
GeofferyOmlette 0:35a52271b5b4 12 printf("Temperature [ %3.2f F ]\r\n", t);
GeofferyOmlette 0:35a52271b5b4 13 printf("Humidity [ %3.2f %% ]\r\n\n", h);
GeofferyOmlette 0:35a52271b5b4 14 wait(5);
GeofferyOmlette 0:35a52271b5b4 15 }
GeofferyOmlette 0:35a52271b5b4 16 }