byte key()
{
int val = analogRead(A0);
if (val < 480) return 99;
if (val < 500) return 11;
if (val < 525) return 0;
if (val < 555) return 10;
if (val < 585) return 9;
if (val < 620) return 8;
if (val < 660) return 7;
if (val < 705) return 6;
if (val < 760) return 5;
if (val < 820) return 4;
if (val < 890) return 3;
if (val < 976) return 2;
return 1;
}
alarms[0].hour = 8;alarms[0].minute = 30; alarms[0].start = true;
alarms[1].hour = 10;alarms[1].minute = 30; alarms[0].start = true;
alarms[2].hour = 10;alarms[2].minute = 45; alarms[0].start = true;
alarms[3].hour = 12;alarms[3].minute = 0; alarms[0].start = true;
alarms[4].hour = 13;alarms[4].minute = 0; alarms[0].start = true;
alarms[5].hour = 15;alarms[5].minute = 30; alarms[0].start = true;
alarms[6].hour = 15;alarms[6].minute = 45; alarms[0].start = true;
alarms[7].hour = 17;alarms[7].minute = 30; alarms[0].start = true;
alarms[8].hour = 17;alarms[8].minute = 45; alarms[0].start = true;
alarms[9].hour = 19;alarms[9].minute = 30; alarms[0].start = true;
alarms[10].hour = 19;alarms[10].minute = 45; alarms[0].start = true;
alarms[11].hour = 21;alarms[11].minute = 0; alarms[0].start = true;
alarms[12].hour = 22;alarms[12].minute = 0; alarms[0].start = true;
alarms[13].hour = 0;alarms[13].minute = 30; alarms[0].start = true;
alarms[14].hour = 0;alarms[14].minute = 45; alarms[0].start = true;
alarms[15].hour = 2;alarms[15].minute = 30; alarms[0].start = true;
alarms[16].hour = 9;alarms[16].minute = 14; alarms[0].start = true;
int data3[5];
for (uint8_t n = 0; n < 3; ++n)
data3[n] = data1[n];
for (uint8_t n = 0; n < 2; ++n)
data3[n+3] = data2[n];
while (1) {
if (PIND & (1 << PIND2)) {
LED_ENABLE();
} else {
LED_DISABLE();
}
for (unsigned int i = 65535; i != 0; --i)
__asm__("NOP");
}
const dataType variableName[] PROGMEM = {data0, data1, data3…};
DEV_EEPROM[0] = newPotValue; // Записываем в EEPROM по адресу 0
DEV_EEPROM[0] >> ledBlinkDelay; // Читаем записанное значение