Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // simple test for SHT temp  modules
00002 
00003 #include "mbed.h"
00004 
00005 #include "SHT.h"
00006 
00007 SHT th1(p5,p6,SHT_high); // sclock, data
00008 
00009 DigitalOut led1(LED1);
00010 
00011 int main() {
00012     while(1) {
00013         th1.update(SHT_high);
00014         printf("t:%6.2fC h:%6.2f%%\n",th1.get_temperature(),th1.get_humidity());
00015         led1=!led1;
00016         wait(1);
00017     }
00018 
00019 }
00020