boolean LEDstate = false; // This will store our LED state void setup() { pinMode(PIN_LED1, OUTPUT); // Set our LED 1 pin as an output pinMode(PIN_BTN1, INPUT_PULLUP); // Set our button 1 pin as an input and // pull it high. } void loop() { LEDstate = digitalRead(PIN_BTN1); // Check to see what state the button is in digitalWrite(PIN_LED1, LEDstate); // Set the LED to whatever state the button // is in. // Repeat ad infinitum... }