Trying to build a "pinspotter" simulator - newbie - any help is appreciated!
wb8yjf
Posts: 4
Hi all, I am a newbie to the stamps, I have over 30 years experience in electronics though. Here is what I am trying to do: I service bowling alley electronics and am trying to make a stamp based "pinspotter" simulator. I already have the assembly built complete with LCD and 4 buttons for inputs as well as a relay driver for outputs. Operation of a pinspotter is pretty straightforward, basically no more than 8 inputs (6 of which determine where the table· & sweep positions during the machine cycle) and the outputs are (2) 110VAC to run 2 motor/gear assys.·and a few 12VDC for lights.· My goal is to have a system where a menu scrolls thru 4 screens with various operations (ie: 1st ball cycle, 2nd ball cycle, strike, etc). I want to set the menus up with 3 options and a "next menu" screen, after going thru all 4 screens, back to the 1st.· I believe this could all be done with sub routines selected by a corresponding switch and then sequencing the relays in the proper order to simulate the inputs on the machine. One thing I can't seem to grasp is scanning the switches while the menu(s) are being displayed and how to "stop" the displayed menu and wait for a switch to be pressed to move on to the next menu or go to the subroutine..I know this is a lot easier than I'm thinking, but with all the electronics floating around in my noodle, I am blanking out on writing code...· I have gotten to the point where I can sequence the relays in what ever order I want and the timing of them too. Any suggestions? This thing would make my life a LOT easier! Now I have to physically put the control chassis on a pinspotter and run it at the bowling alley..pain in the Smile (PLUS a lot of driving). BTW, the outputs of the controller aren't connected to the stamp controller at this time. I would like to monitor them via opto couplers to display a fault (ie: timing is no good).
Can anyone point me the right way?
The stamp is a BS2E.
Thanks!
Jon aka wb8yjf
Can anyone point me the right way?
The stamp is a BS2E.
Thanks!
Jon aka wb8yjf
Comments
http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv62.pdf
And yes, subroutines are your friends.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
PAUSE 1000 'Initialize lcd
SEROUT lcd,Baud,[noparse][[/noparse]4,12,14]
SEROUT lcd,Baud,[noparse][[/noparse]"**JoeMarsRover**"]
PAUSE 3000
SEROUT lcd,baud,[noparse][[/noparse]4,12,14,"HELLO EARTHLING"]
FOR b=1 TO 5000 'Display greeting and allow quick menu selection.
IF IN4=0 THEN menu1
NEXT
menu: 'Menu start
IF IN4=0 THEN menu
IF IN5=0 THEN menu
SEROUT lcd,Baud,[noparse][[/noparse]1,"HELLO EARTHLING Press A for Menu"]
menua:
IF IN4=0 THEN menu1
GOTO menua
menu1:
IF IN4=0 THEN menu1 'This assures the button is released.
IF IN5=0 THEN menu1
SEROUT lcd,Baud,[noparse][[/noparse]1,"*RangeNDriveMix*A=Select B=Next "]
menu1a:
IF IN4=0 THEN rangendrive
IF IN5=0 THEN menu2
GOTO menu1a
menu2:
IF IN4=0 THEN menu2
IF IN5=0 THEN menu2
SEROUT lcd,Baud,[noparse][[/noparse]1,"*****JOEARM*****A=Select B=Next "]
menu2a:
IF IN4=0 THEN Joearm
IF IN5=0 THEN menu3
GOTO menu2a
menu3:
IF IN4=0 THEN menu3
IF IN5=0 THEN menu3
SEROUT lcd,Baud,[noparse][[/noparse]1,"****JoeSFR08****A=Select B=Next "]
menu3a:
IF IN4=0 THEN joesfr08
IF IN5=0 THEN menu4
GOTO menu3a
menu4:
IF IN4=0 THEN menu4
IF IN5=0 THEN menu4
SEROUT lcd,Baud,[noparse][[/noparse]1,"**JoeSFR08Sound*A=Select B=Next "]
menu4a:
IF IN4=0 THEN joesfr08sound
IF IN5=0 THEN menu5
GOTO menu4a
menu5:
IF IN4=0 THEN menu5
IF IN5=0 THEN menu5
SEROUT lcd,Baud,[noparse][[/noparse]1,"***SPEEDRANGER**A=Select B=Next "]
menu5a:
IF IN4=0 THEN speedranger
IF IN5=0 THEN menu6
GOTO menu5a
menu6:
IF IN4=0 THEN menu6
IF IN5=0 THEN menu6
SEROUT lcd,Baud,[noparse][[/noparse]1,"SerialReceiver1 A=SELECT B=NEXT "]
menu6a:
IF IN4=0 THEN SerialReceiver
IF IN5=0 THEN menu
GOTO menu6a
'menu7:
'IF IN4=0 THEN menu7
'IF IN5=0 THEN menu7
'SEROUT lcd,Baud,[noparse][[/noparse]1,"Remote Control A=Select B=Next "]
'menu7a:
'IF IN4=0 THEN remote
'IF IN5=0 THEN menu8
'GOTO menu7a
'menu8:
'IF IN4=0 THEN menu8
'IF IN5=0 THEN menu8
'SEROUT lcd,Baud,[noparse][[/noparse]12,"Sounds A=Select B=Next "]
'menu8a:
'IF IN4=0 THEN sounds
'IF IN5=0 THEN menu9
'GOTO menu8a
'menu9:
'IF IN4=0 THEN menu9
'IF IN5=0 THEN menu9
'SEROUT lcd,Baud,[noparse][[/noparse]12,"BotReceiver A=Select B=Next "]
'menu9a:
'IF IN4=0 THEN receiver
'IF IN5=0 THEN menu10
'GOTO menu9a
'menu10:
'IF IN4=0 THEN menu10
'IF IN5=0 THEN menu10
'SEROUT lcd,Baud,[noparse][[/noparse]12,"UltRangerSSC A=Select B=Next "]
'menu10a:
'IF IN4=0 THEN ultranger
'IF IN5=0 THEN menu
See if this makes any sense to you...If you can break up your operations into 7 programs then with a menu program you can call any of those operations(programs) with a menu such as this. Hope this helps
Glad to see another Jon who knows how to spell the name too!
YEP, you are correct! Those are the chassis I need this tester for. I don't want to go the old way and use a hodge podge of motors, lights & switches...I figured the Stamp would be perfect for this task! I just got done working on two of those beasts..great fun..· Now that the time has come for the season to start soon, I'm swamped all over again! Hopefully I can get this project completed ASAP! Where did you work?
Jon