summaryrefslogtreecommitdiffstats
path: root/humidity_sensors/app/main.c
blob: d7f5908f0acfae62f6efe0e39889ec3ccd882b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "project.h"

void
main (void)
{
  u8 c;

  clock_init();

  uart_init();
  i2cb_init();

  awu_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();
    }

    halt();
  }
}