Thread: Bs2
View Single Post
  #11   Spotlight this post!  
Unread 09-07-2002, 17:42
nwagers nwagers is offline
Registered User
#0240 (Mach Vee)
 
Join Date: Oct 2001
Location: Monroe, MI
Posts: 88
nwagers is an unknown quantity at this point
Send a message via AIM to nwagers Send a message via Yahoo to nwagers
This is the code I ended up using. I connected In0 and In2 to Pin 1 and 3 respectively and set those pins to low. Which solved the problem of the whole random thing. I kinda got the idea from the 3 pole switch idea. I ended up bumping the output to pin 4. The problem with the other code is that it likes to be on 1 more than 0 and gave the illusion that the switches were open.


low 1
low 3
Output 4


Check:
if In0 = 1 then TurnOn
goto Check


TurnOn:
if In2 = 0 then Full
Out4 = 1
Goto TurnOn

Full:
Out4 = 0
goto Check
End