|
|
|
|
@ -146,6 +146,12 @@ void led_set(uint16_t value)
|
|
|
|
|
OCR0A = OCR0B = led_color = value >> 8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void led_off(void)
|
|
|
|
|
{
|
|
|
|
|
OCR0A = 0;
|
|
|
|
|
OCR0B = 255;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void adc_init(void)
|
|
|
|
|
{
|
|
|
|
|
ADMUX = (1 << REFS1) | (TEMP_PIN << MUX0);/* Vref = 1.1, pin selection */
|
|
|
|
|
@ -195,7 +201,8 @@ int main(void)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(setting_timeout) {led_set(target);}
|
|
|
|
|
if(!dev_state) {led_off();}
|
|
|
|
|
else if(setting_timeout) {led_set(target);}
|
|
|
|
|
else {led_set(temperature);}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|