diff --git a/main.c b/main.c index 783edd8..d874879 100644 --- a/main.c +++ b/main.c @@ -44,6 +44,8 @@ static volatile uint32_t time_count = 0; // time after last shake to go to sleep, in seconds #define REST_TIME (5 * 60U) +// period to send our color code, in seconds +#define SHARE_TIME (1U) // time counts per us (1/(16E6/(3+1)) * 1000*1000 = 0.25 us) #define NEC_TICKS_PER_US 4UL @@ -405,6 +407,10 @@ void main(void) } nec_flag = false; // clear flag } + if (0 == time_count % (488UL * SHARE_TIME)) { + nec_transmit(0xfb047f80); + putc('t'); + } if (time_count > 488UL * REST_TIME) { puts("rest\r\n"); time_count = 0; // reset counter