Skip to main content
2 of 2
added 20 characters in body
jfpoilpret
  • 9.2k
  • 7
  • 38
  • 54
// When first time program launches it confused to press push button twice. Well replace it with this

if (x == 1) {
    // Toggle on
    digitalWrite(ledPin, HIGH);
    x = 0;
} else {
    // Toggle off
    digitalWrite(ledPin, LOW);
    x = 1;
}