Posted by Gui Cavalcanti at 02/21/2001 5:00 PM EST
Student on team #422, Mech Tech, from Governor's School (GSGIS) and Verizon.
In Reply to: Re: Joy2 Wheel use as switch
Posted by Joe on 2/18/2001 8:32 PM EST:
While the previous two suggestions are OK, I'm thinking that for a switch you don't need a massive deadzone. Try this, it's also very streamlined. Remember that the potentiometer wheel's middle is 127!
This is just a lot easier than any of the previous suggestions and divides the wheel equally right down the middle. Psst... it's easier to use a 3-state toggle switch, by the way
if (p2_wheel > 127) then relay_3_forward
relay3_fwd = 0
relay3_rev = 1
goto SkipForward:
relay_3_forward:
relay3_fwd = 1
relay3_rev = 0
SkipForward: