Shop OBEX P1 Docs P2 Docs Learn Events
BS2 - Gameshow lockout Controller - Need help! — Parallax Forums

BS2 - Gameshow lockout Controller - Need help!

RGuyserRGuyser Posts: 90
edited 2007-09-13 04:18 in BASIC Stamp
Hello Forum!

I am in a bind. I told a friend I could make him a lockout controller for his 'rock n roll' gamshow nite at the bar he works at. I have contructed the hardware - basically it is 3 relays, and 4 active-lo buttons. There are lights on the 3 relays and the fourth button is for the host. I want a bunch of other special effects also, but these are the core requirements. Thanks!

The following Code creates a nice cycle effect off the lights. I was hoping someone could recommend a good method to a) read the 3 inputs(pins 0 to 3) and then stop the animation and light only the winning light(outputs 8 to 10). I am very rusty with the PBASIC. Havent programmed a stamp in a year. I will upload the code and a schematic once it is all working. I am thinking i need to read port a INL, and then set OUTb = INL, but i cannot quite get it!

Input 0 - 2: the Contestant buttons - active lo
Input 3 : the host button - active lo

output 8-10 : the relay control lines - active hi

Thanks in advance!

Robert



DO
    FOR thePin = 8 TO 10                 ' loop through pins
      TOGGLE thePin                     ' toggle current pin
      DEBUG HOME, BIN4 OUTA             ' show on Debug


      PAUSE 105                        ' short delay
    NEXT
  LOOP     ' repeat forever

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
3D & 2D Design - Technical Documentation
www.robertguyser.com

Comments

Sign In or Register to comment.