SAMCO Arduino Powered IR Light Gun
-
@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)
-
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.
-
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. -
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...
-
@samco friend, I’m looking at your videos about your samco project since 2016 videos.
This concept almost same with wiimote and dolphin bar right?
I has a big problem with wiimote and dolphin bar.
If I use 1 wiimote as a lightgun, it works properly.
But after I connected the 2nd wiimote the crosshair always merge beetwen player 1 and player 2.
I’m already change the dolphin bar mode (1-4)
What I want to ask is, is the wiimote not supported for 2nd players at retropie ? I’m affraid if I build the samco project I will experience the same things.
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.