void
setup() {
pinMode(ledPin, OUTPUT);\xA0\xA0\xA0\xA0\xA0
pinMode(buttonPin, INPUT);\xA0\xA0\xA0\xA0
}
void
loop(){
\xA0 // read the state of
the pushbutton value:
\xA0 currentButton = debounce(lastButton);
\xA0
\xA0 if (lastButton == LOW &&
currentButton == HIGH) {\xA0\xA0\xA0
\xA0// An paththike to
koympi kai prin den htan pathmeno.
\xA0\xA0\xA0\xA0 ledOn = !ledOn; // O,ti timh exei tora pairnei thn
antitheth.
//\xA0\xA0\xA0\xA0
lastButton = HIGH; Den to xreiazomaste giati to parakolouthei h function debounce.
\xA0\xA0 }
\xA0 lastButton = currentButton;
\xA0\xA0
digitalWrite(ledPin, ledOn); // HIGH h LOW analoga ti exei ginei parapano.
\xA0}