Connections: LED Anode to BS2 Pin 1 LED Cathode to resistor to ground Button to +5 Button to BS2 Pin 0. Also resistor from Pin 0 to ground ' {$STAMP BS2} ' {$PBASIC 2.5} PB VAR BIT I VAR WORD PB = 0 WAIT_ON: PB = IN0 ' Button to PB variable IF PB = 0 THEN WAIT_ON ' wait for button press HIGH 1 ' turn LED on FOR I = 0 TO 500 STEP 1 ' 5 second loop PAUSE(10) ' 10 ms delay IF IN0 = 0 THEN PB = 0 ' look for button release NEXT ' repeat 500 times LOW 1 ' LED off WAIT_REL: PB = IN0 ' button to var IF PB = 1 THEN WAIT_REL ' is button released? GOTO WAIT_ON ' do it again END