This code is used to toggle an arduino on and off , the problem is that i can't comprehend it at all. can someone explain to me how does it work ?
New = digitalRead(button);
if ( New!=old)
{
if ( New == HIGH ){
if (LEDstatus == LOW)
{ digitalWrite(LED,HIGH);
LEDstatus = HIGH;
}
else
{
digitalWrite(LED,LOW);
LEDstatus=LOW;
}
}
old=New;
}