X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=firmware%2Ftuer.pde;h=d2c7a09b1aedc4e1aabc47af37e78fe16be352d4;hb=33de7447b0fab42ac6a65fa614a2ae3fe28d5788;hp=c0c4bf170409239d627fad225cbe38e40fb5421d;hpb=082cf658c276a87e89c0f427683371c7a85ac349;p=svn42.git diff --git a/firmware/tuer.pde b/firmware/tuer.pde index c0c4bf1..d2c7a09 100644 --- a/firmware/tuer.pde +++ b/firmware/tuer.pde @@ -22,7 +22,7 @@ byte next_led = 0; #define MANUAL_OPEN_PIN 12 // keys for manual open and close #define MANUAL_CLOSE_PIN 13 // -#define DEBOUNCE_DELAY 625 // * 16us = 10ms +#define DEBOUNCE_DELAY 6250 // * 16us = 100ms #define DEBOUNCE_IDLE 0 // currently no debouncing #define DEBOUNCE_OPEN 1 // debouncing open key #define DEBOUNCE_CLOSE 2 // debouncing close key @@ -38,6 +38,7 @@ int debounce_cnt = 0; #define CMD_OPEN 'o' #define CMD_CLOSE 'c' +#define CMD_TOGGLE 't' #define CMD_STATUS 's' #define CMD_RESET 'r' @@ -109,7 +110,7 @@ void start_debounce_timer() // this breaks millis() function, but who cares debounce_cnt = DEBOUNCE_DELAY; TCCR0A = 0; // no prescaler, WGM = 0 (normal) - TCCR0B = 1< 16us @ 16 MHz TCNT0 = 0; // reseting timer TIMSK0 = 1<