In SX Microcontrollers, SX/B Compiler and SX-Key Tool, natpie wrote: [quote="SamTheMan"] do loop until button=1 ' loop until key is pressed[/quote] This might end up causing you some problems. Unless only press the button for a nannosecond it will cycle through your whole program when you press the button. You need to only pass once per press. You can do this by tracking the previous known state of the button. So if the button is pressed, and last time I checked it was pressed, then this is not a new press so don't move on yet. But if the button is pressed, and last time it checked it was not then this is a new button press and we can move on. In addition you may need to debounce your signal (when you press the button as it is making contact it will turn on and off rapidly untill the contacts are firmly touching). This can be addresed by checking the button and not counting the press untill you get the same result several times in a row. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=362566#m362596 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)