In SX Microcontrollers, SX/B Compiler and SX-Key Tool, javalin wrote: Hello all, I've a remote control which toggles outputs its output pin which latches - i.e. you press the remote button "A" and output "A" stays high or low until you press "A" again. If I want to detect the input toggleing and then change the state of my output i'd ideally do: [code] lastInput1 var Byte input1 pin ra.0 output1 pin rb.0 ... IF input1 <> lastInput1 THEN TOGGLE output1 ENDIF lastinput1=Input1 [/code] But this doesn't work in SXB. The compiler throws back "INVALID PARAMETER LastRemote1". If I do: [code] lastInput1 var Byte input1 pin ra.0 output1 pin rb.0 temp var Byte ... temp=input1 IF temp <> lastInput1 THEN TOGGLE output1 ENDIF lastinput1=Input1 [/code] Compiles but still doesn't work.... Help, Any idea's? Thanks, James ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=401158 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)