Dependencies:   mbed

Committer:
roselea
Date:
Sun Jan 24 22:00:35 2010 +0000
Revision:
0:df1c8f2961a1

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
roselea 0:df1c8f2961a1 1 // simple test for SHT temp modules
roselea 0:df1c8f2961a1 2
roselea 0:df1c8f2961a1 3 #include "mbed.h"
roselea 0:df1c8f2961a1 4
roselea 0:df1c8f2961a1 5 #include "SHT.h"
roselea 0:df1c8f2961a1 6
roselea 0:df1c8f2961a1 7 SHT th1(p5,p6,SHT_high); // sclock, data
roselea 0:df1c8f2961a1 8
roselea 0:df1c8f2961a1 9 DigitalOut led1(LED1);
roselea 0:df1c8f2961a1 10
roselea 0:df1c8f2961a1 11 int main() {
roselea 0:df1c8f2961a1 12 while(1) {
roselea 0:df1c8f2961a1 13 th1.update(SHT_high);
roselea 0:df1c8f2961a1 14 printf("t:%6.2fC h:%6.2f%%\n",th1.get_temperature(),th1.get_humidity());
roselea 0:df1c8f2961a1 15 led1=!led1;
roselea 0:df1c8f2961a1 16 wait(1);
roselea 0:df1c8f2961a1 17 }
roselea 0:df1c8f2961a1 18
roselea 0:df1c8f2961a1 19 }
roselea 0:df1c8f2961a1 20