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
#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); } }