I am working on a project for work we are turning a old 1990s shooting gallery into hopefully a generally smart shooting gallery. I know this will be an extensive style build and have not done much with Arduino projects. I know the basics as to I know I will need an ir receiver and transmitter of coarse the boards which I believe a Mega should be able to support 35 targets. Now my question is in the code how would you set the target to get what ir signal is the one that shot it (as I know you can set up a different RF signals for the guns so it can be detected that way just how would you put that into Code?) How would you determine how many shots are left? It will be free play so we just need it to recognize that when a button is pressed it gives you those shots.
Have You designed how to mount those 35 sensors?
Yes, We have all of them modified to use the same targeting system as there was before. However, I am working on a code that is going to say basically when target 1-35 is shot that arduino will read the unique ir signal and set pin to high then return to normal. I believe I have that script down now my issue is trying to get the arduino to have a individual pin set to when it is pulled up it start my loop of they have 35 shots if one of the pins are pulled up on the board due to a successful hit it brings there score up 100 points once the shots have hit 0 then it puts the start pin to low until they hit play again. Note (I am using Node Red for the start program for this device so it is a touch interface on android to start this program.)
Without knowing what those signals really are, and what the difference is, it's hard to give any useful advice.
Now my question is in the code how would you set the target to get what ir signal is the one that shot it (as I know you can set up a different RF signals for the guns so it can be detected that way just how would you put that into Code?)
There are 2 conceivable ways that I can see this is done:
- Your transmitters has to transmit unique signal each. You can then wait for one of your receiver to detect the first signal, then immediately jump into a routine that checks the whether the signal is matching. So maybe one of your transmitters transmit "10110" in 50ms interval as a signal. When the transmitter received the first "1", it then waits for 50ms, then checks for a "0". Then it checks for "1" again and so on. I'm oversimplifying here.
- If you can connect the transmitter to Arduino, you can have it check for input the moment it's triggered. When one of the transmitter is triggered, the Arduino goes into "search mode" and checks the input for all the receivers. During this split second of "search mode" other transmitter is disabled, so that's a major downside.
Without knowing what those signals really are, and what the difference is, it's hard to give any useful advice.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.