SAMCO Arduino Powered IR Light Gun
-
Hi Guys, just a quick update. Build Guide is now available...
-
@samco The costs are little imho
20$ the gun
25$ the IR camera
10$ the itsybitsy
2.5$ for some hardware -
@samco congratulations on your project!
This is indeed very well executed, spot-on and seems to give a very professional result. I think everyone will appreciate the simplicity and openness of your design.Kudos!
-
@samco Thanks! That's certainly professional and straigtforward.
I have several questions, if you don't mind.
I assume any small arduino, like the nano or the micro, would work, don't they?
Also, do you think it would be possible to use a Namco Guncon 2 instead of 1? It already uses a usb cable and has extra buttons and a directional pad at the back. This would avoid the need for building the calibration button. I assume that the arduino code can be extended to add support for additional buttons (since the arduino has several input pins available) but I'm unsure whether a Guncon2 (which is smaller as has more internals for the extra hardware) would fit the arduino and the camera.
The IR camera you use can detect up to 4 IR lights. Do you think tracking could be improved by using additional leds around the screen? Or even avoiding the need for recalibration?
And, finally, I understant that the arduino is detected in Retropie as a standard mouse, so that it can work as is in all emulations that use mouse input as lightgun, is this the case? -
@janderclander14 said in SAMCO Arduino Powered IR Light Gun:
I assume any small arduino, like the nano or the micro, would work, don't they?
The micro yes ... then nano no.
You need a HID compatible device.
If I'm wrong then please correct me.And, finally, I understant that the arduino is detected in Retropie as a standard mouse, so that it can work as is in all emulations that use mouse input as lightgun, is this the case?
yes
If you consider the costs ... you are equal to a DolphinBar (and if you already have a wiimote you are cheaper)
10-15$ the Dolphin bar
25$ the Wiimote
20$ a gun "case"About the namco guns.... they are very cheap in Japan nowadays.
Take a look here -
@janderclander14 said in SAMCO Arduino Powered IR Light Gun:
@samco Thanks! That's certainly professional and straigtforward.
Thanks!
I assume any small arduino, like the nano or the micro, would work, don't they?
Yeah Like @cyperghost said any HID compatable board will work.
Also, do you think it would be possible to use a Namco Guncon 2 instead of 1? It already uses a usb cable and has extra buttons and a directional pad at the back. This would avoid the need for building the calibration button. I assume that the arduino code can be extended to add support for additional buttons (since the arduino has several input pins available) but I'm unsure whether a Guncon2 (which is smaller as has more internals for the extra hardware) would fit the arduino and the camera.
Yeah, I've already looked into this (most likely going to be my next project). You could have the mouse and keyboard libraries loaded on, so some buttons could be keyboard strokes and some some mouse buttons. A little more tricky due to how the buttons are configured but I'm hoping to work away around this. And yes the camera fits.
The IR camera you use can detect up to 4 IR lights. Do you think tracking could be improved by using additional leds around the screen? Or even avoiding the need for recalibration?
I have seen other projects that use 4 leds, but haven't looked into it to much yet. Also something I'm considering.
And, finally, I understant that the arduino is detected in Retropie as a standard mouse, so that it can work as is in all emulations that use mouse input as lightgun, is this the case?
Yes, but only a few do at this stage. No PSX yet. But I keep hearing rumours that this isn't too far off.
Cheers Sam
-
@samco Do you think you can rewrite this to circuit-python?
Then you will make full use of the M0 board. You know it has a python interpreter on board ;) -
@cyperghost I don't actually know python yet :) but from the little research I've done C++ actually runs faster than circuit-python (can anyone confirm this?). I am interested in circuit-python thou, definitely on my "to learn" list.
-
c++ will be faster depending on what your doing speed might no matter that much in the big picture.
-
@samco @grant2258 I think you're both on the wrong track. The Adafruit M0 controller has a file system enabled. So you just plug it in to any computer and it will show as a storage device. This device holds a file
main.py
where you immedialty can alter program code. So in fact you don't need an IDE ... just copy and paste code to that storage device and you are fine.
Speed does not matter in this case (imho) the camera does most of the work and the calculations done by C code or python is not really difficult.
Maybe I'm wrong .... but with the M0 you can even play wave-files ;) I think it is a feature that isn't usefull on a light-gun system (ironic!) -
@samco I was told from another site that the author of this related project:
https://retropie.org.uk/forum/topic/22531/xwiigun-a-line-of-sight-accurate-wii-remote-lightgun-hack
may be willing to offer his automatic calibration code to be integrated into your project. I've personaly tested it and self-calibration and tracking is excellent, but support for mouse emulation in Retroarch emulators is quite limited. He should have posted into your git's issues.
-
@janderclander14 Yeah, he messaged me in GitHub. Thanks for linking us up!
-
Hey Guys, not exactly RetroPie related (unless PSX Beetle & Beetle Saturn works with the new RPI 4 fingers crossed) but if your interested I have a setup guide for the SAMCO working on PSX Beetle & Beetle Saturn on RetroArch in Windows.
By the way, if any does know if PSX/Saturn Beetle works on the new RPI 4, I'd love to know?
-
Hi Guys,
Just another quick vid showing the SAMCO Light Gun in action...
-
@samco I've everything in place so I might rebuild your project ;)
But don't expect something in the next few weeks.
Thank you for sharing -
@cyperghost Nice! let me know how ya go :)
-
Hi Guys, this is just a quick update to let you know I've added a new sketch to the GitHub for anyone who wants to add a foot pedal to their Samco. It's really simple just grab any momentary foot switch (I used one that was for a tattoo gun there's heap of these on eBay) and solder it to the broken out Alt pins on the PCB (I knew I broken out an extra pin for a reason :) ). Basically all it does is gives you an extra right mouse button but it's great for dual gun mode in Time Crisis II on PCSX2 and it's just cool to have a foot switch. Attached an image so you can see how it all fits.
Also updated the old code slightly so it releases the mouse in pause mode so you can use your normal mouse again when your Samco's paused.
Cheers.
-
-
nice!! i have been looking in to making a lightgun mod.
my idea was basically one of these https://s.click.aliexpress.com/e/mdDVIbq0
then rewire it so that the charging port is at the base of the gun and the buttons then are wired to the guns switches and buttons.
in the model 2 emulator i have a trackball keyboard and wireless airmouse and they seem to auto assign and be controlled independently so you can have two players use 2 mice!
but the issue i have is that the pointer wont leave the screen and so if you point the gun back at the monitor after pointing away from the monitor the calibration is off. its just a case of moving the pointer centre on the opposite side. so its only good providing that you stay pointed at the screen for heated gun slingin sessions.
i just ordered one of the samco boards so am looking forward to getting one and working.
i wonder if can work in the gcon 2 also?
or the sega saturn gun (this is the main gun id like to mod).my main question is when you point away from the screen is the tracking all ok or do you have to recalibrate like an air mouse?
also. do you need sensors around the monitor?
thanks
-
Thanks man, yeah I had a bit of a play around with those wireless pointers but the one I had the calibration would constantly go out was pretty much unplayable. In my build the tracking is done by the leds so once you're calibrated you continue to get accurate tracking where ever you point it.
I am looking at making a GunCon2 version hopefully it's not too far off. I haven't looked into Sega Saturn yet but definitely will now.
As far as sensors go it's just the 2 leds on top of the screen or you can use aftermarket dolphin bar like this one https://www.aliexpress.com/item/32963414424.html?spm=a2g0s.9042311.0.0.7a8e4c4daLPEoQ.
Have fun building your light gun would love to know how ya go :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.