From 1533f82ec411acc1a812f77ae0033a1da07c1f8b Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Sun, 15 Jun 2025 17:47:34 +0200 Subject: [PATCH] n21: send value of door sensor every minute this will allow us to determine the best value for a adc limit to detect open/closed windows and doors. --- avr/devices/n21/main/main.asm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/avr/devices/n21/main/main.asm b/avr/devices/n21/main/main.asm index 15e3068..c3b00dc 100644 --- a/avr/devices/n21/main/main.asm +++ b/avr/devices/n21/main/main.asm @@ -173,7 +173,6 @@ onMessageReceived: onEvery100ms: onEverySecond: -onEveryMinute: onEveryHour: onEveryDay: ret @@ -181,6 +180,14 @@ onEveryDay: +onEveryMinute: + lds r16, tcrt1kLastValue + ldi r17, VALUE_ID_ADC + ldi r22, AQHOME_VALUETYPE_UNKNOWN ; VALUE TYPE + rjmp Main_Send8BitValueReport + + + ; --------------------------------------------------------------------------- ; @routine onEveryLoop ;