where is wrong ?

void lamba()
{
if (EEPROM.read(3)==Hour & EEPROM.read(5)==1)
{
lamba_kont=1;
}

if (lamba_kont=1)
{
digitalWrite(lamba_pin,HIGH);
}
else{digitalWrite(lamba_pin,LOW);}

if (EEPROM.read(4)==Hour | EEPROM.read(5)==0)
{
lamba_kont=0;
}

}

hi

lamba_kont = 0 but lamba_pin is HIGH always.
where is wrong ?

if (lamba_kont=1)

The assignment operator is =. The comparison operator is ==.

osezer34:
{
if (EEPROM.read(3)==Hour & EEPROM.read(5)==1)
{

The comparison AND operator should be && as shown below.

if (EEPROM.read(3)==Hour && EEPROM.read(5)==1)

it was && i changed for test
problem is fixed "if (lamba_kont==1)"

thanx all :slight_smile:

Same here:

if (EEPROM.read(4)==Hour | EEPROM.read(5)==0)

Needs || .