In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bennettdan wrote: Hello, I want to be able to have two buttons one up and one down and have it output to only four different outputs. Would this work? Position Var byte Main: If ButtonUp = 1 then Position = Position max 4 Position = Position + 1 Elseif ButtonDown = 1 then Position = Position min 1 Position = Position - 1 endif If Position = 1 then outputA = 1 elseif Position = 2 then outputB = 1 elseif Position = 3 then outputC = 1 elseif Position = 4 then outputD = 1 endif GOTO Main ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=200241 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)