' {$STAMP BS1} ' {$PBASIC 1.0} ' BS1 TXC V2.1 Card Setup: DEBUG "Setup start" INPUT 0 ' Button pin OUTPUT 6 ' LED pin Main: IF PIN0 = 0 THEN SendData ' If button is pressed. Pin0 turns low when button is pressed PAUSE 100 GOTO Main SendData: GOSUB FlashLED GOSUB SOut GOTO Main FlashLED: PIN6 = 1 ' LED on PAUSE 100 PIN6 = 0 ' LED off PAUSE 100 RETURN SOut: SEROUT 7, T600, ("y") PAUSE 1000 RETURN