'Demonsterates the auto repeat of the button command '--------------------------------------------------------------------------- 'This demonstration requires a button wired to pin 1. Use a 10k resistor to ' Pull down to VSS 'Tie the other end of the button to VDD ' 'Place a LED between pin 2 and VSS. 'When you click the button you get a single led blink. Hold the button down ' and it auto repeats. '--------------------------------------------------------------------------- 'The button command needs a working variable. work var byte work =0 Input 1 'Button output 2 'LED low p2 'Make sure our display pin is low to begin with Loop: Button 1,1,20,2,work,1,press pause 20 'We need some delay or else its all just too darn fast. goto loop 'This is where you do your button work press: high P2 pause 10 low P2 goto loop