help with paintball gun trigger progect project before i spend money i dont have
blink13
Posts: 65
I am tryin to write (what should be a simple program)·a program in order to controll what·the action of the pushbotton will be(lets call this·button A) by the press of another pushbutton (button i have tried many programs but none seem to work i am using a homework board which uses BS2 language please help me befor i by a basic stamp. This will be powering a solenoid so that my paintball gun can shoot auto semi auto and bursts (i dont want to spend 300 bucks on one made by tippmann)
please help
please help
Comments
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
So many projects, so little time.
'{$PBASIC 2.5}
IF IN4 THEN
GOTO 1
endif
1:
IF IN0 THEN
endif
do
HIGH 3
PAUSE 100
LOW 3
loop
2nd push:
IF IN4 THEN
GOTO 2
endif
2:
FOR counter = 1 TO 6
HIGH 3
PAUSE 100
LOW 3
next
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Something like this: When button A is pressed, a press of button B does X. When button A is NOT pressed, a press of button B does Y. And ... do you want active-high or active-low inputs. This is the trickiest part of programming: clearly defining the problem.
I'm sure it will be easy to solve once the definition is understood.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
the generall idea of what i want to do is controll a solenoid in my paintball gun this will release the cock causing my gun to fire.
i want to controll the solenoid with abutton attached to the microconrteroller
but in my plan i ran into a delema. this was what i do if i want to shoot semi auto or in bursts to do this i wanted to use a second button to change the output of button B which would then make it only shoot six at a time or 1 at a time i have no idea how to do this
If the mode input is off, then you can only fire one shot at a time -- you must release the trigger between shots.· When the mode switch is in semi-auto, you want to burst six shots at a time.· After that you have to release the trigger before the next burst.
The attached program may look a little advanced but trust me, this is how it should look.· Please don't fall into the trap of using lines like
· IF IN4 = 1 ....
This is lazy, sloppy coding, and will just lead to troubles as your programs grow and you have to make changes.· Learn to define your IO pins, your constant values, and give your variables (in fact, everything) meaningful names.· The few minutes you spend up front doing this will make your program much easier to construct and debug.· We have a document on our web site called "The Elements of PBASIC Style" (it's also in our help file).· Read it.· Apply the guidelines and save yourself a whole bunch of headaches later.
Good luck with your project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Post Edited (Jon Williams) : 1/28/2005 4:43:59 AM GMT
IF IN4=1 Then
DO
HIGH 3
PAUSE 100
LOW 3
LOOP UNTIL
IN4= 0
END
but thus dident work, i have actually figured out a differnt way to change how many times it shoots but that does not have to do with proggraming
what kind of solenooid are you using? what kind of gun you have? did you have do any other mods to the trigger assembly?
how did you make sure that you're not push (or pulling) the solenoid faster than the gun fires?
i just bought a spyder and was pondering a similar mod my self. any help?
if you could help me understand the mechanics i should be able to help you develop better firing algorithms
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
actually i have a tipmann which has plenty of room in the handel for a solenoid as long as it is less than half an inch in diameter and pushes with a returm string . Spiders are much more complicated than tippmans and probably cant be modded unless you by a new trigger frame (which can be done) but the electric triggers for them are much cheaper. for a tipmann a trigger is like 300$ but a spiders is about a hundred bucks. another great thing about tipmanns is that they fire as fast as you can pull the trigger (within reason) i plan to use a DO LOOP command for full auto and a HIGH command for semi and a COUNTER for bursts. i plan two use basic stamp but i am prototyping with a Homework board. if you have any questions about paintball just ask but i really need help with my program so please respond if you know of a command i could use inorder to get the solenoid to start when a button is pushed. if i finish this project succsesfully i will try to post it under the projects forum
Shawn
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Remember - No matter where you go
There you are.
does your circuit look anything like this?
are your inputs active high or low?
what are the specs on your solenoid?
etc....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
http://www.expresspcb.com/ExpressPCBHtm/Download.htm
there is an "export to bitmap" option under File that generates a bitmap.
i crop and edit the bitmap with paint to center in on the ckt before i post.
but you could even just open my doc with paint and move stuff about.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
but it wont send, ill explain it it is a button going to the bs1 which then goes to a solenoid i dont have paint becuase my comp was just wiped.
because john's script is for a bs2
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
League Bowling.... it's not a sport, it's a way of life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA