User Manual
63
/
223
{
digitalWrite(ledPin, LOW);
}
}
In the 'loop' function there are two 'if' statements. One for each button. Each does
an 'digitalRead' on the appropriate input.
Remember that if the button is pressed, the corresponding input will be LOW, if
button A is low, then a 'digitalWrite' on the ledPin turns it on.
Similarly, if button B is pressed, a LOW is written to the ledPin.
Example picture










