SAMCO Arduino Powered IR Light Gun
-
@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 :)
-
Thanks for the reply. I bought two samco boards just incase I mess one up.
The ultimarc ones are very expensive for what they are so this is a nice alternative.I wonder if its possible just to have the samco just fit inside of the sega saturn gun So you don't have to change anything? (the ultimarc ones are modelled after the saturn gun, and its the same gun sega used for virtua cop etc).
I will eventually build an arcade for myself in a year or two (i build them for my shop and for customers but at home this is a totally different story lol).
Ive always disliked visible sensor bars and perhaps it is possible when having an arcade machine the monitor has a glass panel infront of it that usually is black around the edges (the bezel).But it could be possible i think to cover the glass with a privacy screen (that you use to darken car windows). Perhaps then the leds could sit behind the glass and still be seen by the sensor.
I will have to try this out. It would mean that you could have an arcade without little sensors visible. I think it would work as most remotes etc have a darkened transparent plastic infront of them (much like a wii remote or sensor bar has) -
No worries man, I searched a few videos on YouTube so I could see the insides of a VirtuaGun and it looks like the PCB's are quite similar so would be interested to know if a SAMCO does fit in one. Let me know how ya go.
Yeah, a hidden sensor bar would be great even if you took an aliexpress sensor bar and kind of inset it in your cabinet so it's not so obvious would be cool :)
-
@samco Ok i finally managed to order the stuff i need (got it all from the pi hut as am in the UK)
Here are the UK links for the parts.
IR CAMERA
https://thepihut.com/products/ir-positioning-camera-for-arduino?variant=27741017617RESISTORS
https://thepihut.com/products/adafruit-through-hole-resistors-100k-ohm-5-1-4w-pack-of-25IR LED
https://thepihut.com/products/adafruit-super-bright-5mm-ir-led-940nm(OR THE ALIEXPRESS USB SENSOR)
https://www.aliexpress.com/item/32873063325.html?spm=a2g0s.9042311.0.0.78f74c4drfqie7ITSYBITSY
https://thepihut.com/products/adafruit-itsybitsy-m0-express-for-circuitpython-arduino-ide-ada3727If I manage to get some time during christmas I will look forward to building it!
I have seen a lightgun on kickstarter called the Sinden Lightgun but I always have my doubts with kickstarter (Shenmue 3 been a big let-down for PC for me, still haven't received anything and all I have so far is an Epic store code through email!) so I wonder if that lightgun would fail to deliver in the end and would be any better than this.
Because this has the advantage of costing less, is a nice hobby build to do also.
I bought 2 sets from you because I am looking to do a gcon and also a virtua gun one so I will post here my progress with them! -
@mrbee That's awesome dude! You might need to get some other resistors thou I just had a look at your link it looks like your've bought 100K ohm instead of 100 ohm?
Yeah, I'm super curious to see how the Sinden goes as well. But I'll never get over trying to build stuff like this myself :)
Sorry for the late replay, I actually only saw this post because I've just put a new video and was about to post it here. It's a test sketch for the light gun so you can test your setup before uploading the final code.
-
thanks for the heads up! just ordered 100 ohm resistors! i would have gone off my head not realising this error!
i watched the new video and will follow this when calibrating etc! loving the updates and responses here. am looking to build this on sunday!
will send some pics here hopefully of it going in the virtua gun also! -
@samco Ok, I built it am just getting the hang of trying to load the software into it now.
-
I downloaded the arduino ide software, i couldnt find the board so i went on the website to get the adafruit itsybitsy m0 board in the board manager..
I selected it, i select COM 8 as the only showing port for it.
I click upload (also tried verify) and i get this -Arduino: 1.8.10 (Windows 10), Board: "Adafruit ItsyBitsy M0, Arduino, Off"
exec: "/bin/arm-none-eabi-g++": file does not exist
Error compiling for board Adafruit ItsyBitsy M0.What have I done wrong?
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.