SAMCO Arduino Powered IR Light Gun
-
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?
-
@mrbee hi mate, it sounds like you need to install SAMD support (it's at the top top this page here but easy to miss https://learn.adafruit.com/introducing-itsy-bitsy-m0/using-with-arduino-ide) try going back into your board manager and search for Arduino SAMD and install the first one you see (not the beta) and try upload again. Hopefully that'll fix it :)
-
@samco You were correct! I had to delete the userdata folder of the arduino for it to work, doing this it got to the step where windows says to install the driver. It didnt do this before!
I've now got it running!!!
You are simply amazing for getting this all made and coded its perfect!! -
This is the Virtua Gun opened. The board is about 1cm bigger than the gcon.
The plastic of mine split at the screw holes and the trigger cover had shattered off so i had to glue repair it!
So be careful opening the virtua guns. Plastic seems to be far more brittle than the g con.I think i should be able to put your boards inside if but just fixing it inside with a gluegun.
If you ever made boards for these you could call it the Samcop lol (Virtua Cop being the most popular use of this gun).
Your samco boards are millimeter perfect and i messed up the soldering a few times (wires soldered on the underside instead of the top etc) so i had to desolder a few times and each of the contacts on the board are perfect and no worry of them accidentally prying off of the board so perfect for people who are going to give this a go without too much soldering experience.
I like also that it uses the existing buttons etc as much as possible.
Excellent am super happy with the boards and also fast replies helping me.
cheers man -
@mrbee that's awesome dude!! Glad you like it :)
-
@samco oh no im actually having some trouble with it.
Ok so in work where i tested it on the desktop on a 4:3 19" monitor it works ok, although the mouse pointer is a bit jumpy.
But getting home all of my displays are widescreen. The resolution is set on the script same as my monitors (1920x1080) but when using the gun... the mouse pointer will only work along the left side of the screen and end up having as the middle of the screen being like the right side of the screen to the gun if you get me.
I tried all sorts, of distance from the monitor and now the axis seems to be reversed where if you move the gun up the mouse pointer goes down and same for left and right is reversed.
It goes back to normal then but this makes it only work on one side of the screen!So not sure what to do to fix this.
-
@mrbee the only thing I can think that would be causing this is some sort IR interference. The camera will pick up any IR Light including sunlight so if you have window behind your monitor or even something that can reflex it, it might be picking it up a messing with the code. You can test this by running through my trouble shooting vid which will show all the light points the camera is picking up. Let us know how ya go.
-
I cant seem to delete my posts here so having to edit them, had some trouble with processing3 crashing but its all ok now!
-
Ok getting somewhere now (i reuploaded the file to the gun, seems to be working but the camera is detecting the axis wrong so up and down is left and right etc)..
This is in processing3.
It is smooth as butter in processing3 sketch test.Uploading the windows file to the gun then its not smooth at all, i press calibrate and the pointer goes to the upper left side of the screen, so then i move the mouse centre. I press calibrate then and the pointer is all jumpy, sometimes axis is swapped. Other times then axis is fine.
when moving the gun across the screen the pointer zig zags up and down, not smooth at all like in the test -
Ok back to the original problem again! arrgh!
Ok, so i uploaded the test file, and ran processing3 sketch. This finally loaded fine (changing port to 12) and reuploading the file. I finally got the sketch to work.
However here is the issue I am at right now, in the processing window, the green and red dots move around but the axis is turned. So ive had to turn the camera inside the gun so that the led power light on the back of the camera is on the left side of the gun.
This makes is so when i aim the gun, the green dot is on the left and the red dot is on the right. When i twist the gun anti clockwise however, the red dot turns clockwise.I then thought perhaps something is up with the camera, maybe it was built wrong, or maybe ive wired it wrong..
So i turned the camera inside the gun so now it works fine in the processing sketch, i move it around, twist the gun, it all reads perfect and every button works and up is down and down is up.
The issue is when i twist the gun clockwise, the green and red turn anticlockwise..so in the test it works fine apart from that.
I upload then the samco windows ide file and upload this to the gun. then all this does is make the mouse pointer go crazy and all over the place and up and down is fine but left and right is mirrored!
Its so crazy.So just wondering how it would work fine in sketch, but then when uploading the ide script for windows it doesnt work right. Often the mouse will go crazy.
Happy new year to you, im sorry am replying with problems! I want to get it done so can share it within the community (I shared to the launchbox community already) and I would like to get to the root of it.
See you in 2020!
-
@mrbee happy new year mate. Ok, so it’s sounds like you setup is all good. Now I think it might during the calibration process. It should go something like this...
Start by pushing the calibration button, this should move the curser to the top left hand corner of the screen, aim your light Gun at the curser and pull the trigger, the curser should then move to the bottom right hand corner of the screen, aim the lightgun at this curser and pull the trigger again. The curser should now track the position of the light gun.
Hope this helps mate, let us know how ya go.
-
@samco this was the problem all along!
feel so stupid.
my issue i have now is that it calibrates to the top left but rarely on the bottom right so have to adjust where i am standing etc a bit more i think.tested it out on model 2 emulator with virtua cop. set emulator res to 1280 and it works perfect (albeit with a bit dodgy bottom right calibration)
anyways geek stuff aside. i hope the fires in aus arent causing problems or anything for any of your family and friends. i realised well shit.. here ive been banging on about lightgun calibration and aus is on fire!
sending much love from here in wales!
-
@mrbee all good mate. I know it's a lot to take in especially when your just keen to start light guning again :) Yeah, bottom parts of the screen are gonna be the first part to effected if you're too close to the screen, might just have to move back a bit can't be too close to the screen unfortunately.
Also thanks man, been lucky enough that none of my family and friends have been too effected by the fires but a lot of people have so thanks for the support :)
-
Hi Guys, just a quick update got some new boards out including one that works with GunCon2. Here's a quick vid if ya interested.
Cheers Sam(co)
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.