Robert Taylor / Mbed 2 deprecated sht31_II

Dependencies:   Sht31 mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "Sht31/Sht31.h"
00003 
00004 Sht31 sht31(D14, D15);
00005 
00006 int main()
00007 {        
00008     printf("Hello\r\n");
00009     while (true) {
00010         float t = sht31.readTemperature();
00011         float h = sht31.readHumidity();
00012         printf("Temperature [ %3.2f F ]\r\n", t);
00013         printf("Humidity    [ %3.2f %% ]\r\n\n", h);        
00014         wait(5);
00015     }
00016 }