SAMCO Arduino Powered IR Light Gun
mrbee last edited by mrbee
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.
mrbee last edited by
@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.
Hi Guys, just another quick update. I've had a bit time on my hands lately (as have probably a lot of us) so I decided to put together my own version of a 4 LED light gun system. I decided to design it around 2 sensor bars one at the top of the screen and one at the bottom so you don't have to muck around with wiring up leds if you don't want to. Anyway, I've made a quick video so show you how it works so check it out if ya interested.
Hey guys, just uploaded my GunCon2 build guide.
ricebelly last edited by
Hi @samco ,
I've soldered all the relevant bits to the Samco2 board on gcon2.
I've setup (under Win10) IDE software downloaded the latest source code and got the Samco_2.0_2IR_Test.ino successfully uploaded and tested the processing_sketch. The green/red dots and buttons work ok.
Q1) with the 2IR_test loaded, should i be able to calibrate the gun?
i.e. when i click on calibrate button (gcon2 reload button), it doesn't move the mouse to top left etc.
However, thinking i need to load the actual source code (Samco_2.0_2IR.ino) to get the actual calibration working... i attempted to load the Samco_2.0_2IR.ino code and get this error:
What am I doing wrong?
NB. i'm usng the ItsyBitsy M4 Express card (on COM5) port.
mrbee last edited by
Hey @samco hope all is well!!
I am just thinking, there is a gun out there in production called the Sinden Lightgun, you have probably heard of it.
Anyways, physically it is the same i think, camera based etc. But it uses a white border as it calibration, do you think it is possible to make an arduino version with a camera and with border software? do you think this would be better than the i.r method?
Hi Guys, I know it's been a while but have finally updated my code to have saved calibration & increased accuracy. Get out the my new vid...