diff options
Diffstat (limited to 'humidity_sensors/app/main.c')
-rw-r--r-- | humidity_sensors/app/main.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/humidity_sensors/app/main.c b/humidity_sensors/app/main.c new file mode 100644 index 0000000..a94d681 --- /dev/null +++ b/humidity_sensors/app/main.c @@ -0,0 +1,27 @@ +#include "project.h" + +void +main (void) +{ + u8 c; + + clock_init(); + + uart_init(); + i2cb_init(); + + sht20_reset(); + + //enableInterrupts (); + + for (;;) { + printf ("$SNTHD,%s,%s\n", sht20_temp_s(), sht20_humid_s()); + + while (!uart_rx (&c)) { + if (c == 'R') + sht20_reset(); + } + + delay_ms (1000); + } +} |