From c994c3323ee1b0d19faa86ebe26a01d566b86eaa Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Feb 2021 18:33:49 +0000 Subject: stm8 humidity sensor --- humidity_sensors/app/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'humidity_sensors/app/main.c') diff --git a/humidity_sensors/app/main.c b/humidity_sensors/app/main.c index 6f15cdf..6c9e602 100644 --- a/humidity_sensors/app/main.c +++ b/humidity_sensors/app/main.c @@ -15,9 +15,11 @@ main (void) sht20_reset(); - enableInterrupts (); + enableInterrupts(); for (;;) { + sht20_setup(); + printf ("$SNTHD,%s,%s\n", sht20_temp_s(), sht20_humid_s()); while (!uart_rx (&c)) { @@ -25,8 +27,8 @@ main (void) sht20_reset(); } - delay_ms(10); + delay_ms (10); halt(); - delay_ms(10); + delay_ms (10); } } -- cgit v1.2.3