aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-04-12 18:32:41 +0530
committerAkshay Nair <phenax5@gmail.com>2026-04-12 18:32:41 +0530
commit9ed512b6863311ff53f07b76f6b679fa1ec6a9c9 (patch)
treedd5f27857fe106a8d1a6081d2837d4c9fcf87857 /src/main.c
parent2f23df99bc82ef2d06dd962599f1abb4b48fb556 (diff)
downloadtemperature-sensor-attiny84a-9ed512b6863311ff53f07b76f6b679fa1ec6a9c9.tar.gz
temperature-sensor-attiny84a-9ed512b6863311ff53f07b76f6b679fa1ec6a9c9.zip
Add thermocouple sensor SPI interface
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 1b804b7..513d8b3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3,14 +3,16 @@
#include <util/delay.h>
#include "display.h"
+#include "temperature.h"
int main(void) {
display_init();
- int n = 1;
+ temperature_init();
+ float temperature = 0;
while (1) {
- display_draw_float2(1.01 * n);
- n = (n + 1) % 100;
+ temperature = temperature_read();
+ display_draw_float2(temperature);
_delay_ms(1000);
}