Main > Lightguns
GUN4IR - The Ultimate 4 Points Lightgun System
<< < (31/227) > >>
kill_one:
for led 940nm better 25 or 40 degrees?
kill_one:

--- Quote from: JayBee on January 16, 2020, 11:02:32 am ---Yes my home made control circuit is very similar, however I've been using a n-channel mosfet (IRL540) because I've heard they work better for solenoids with the low current and voltage output of the Arduino. I also use stronger kickback diodes and additional resistors to protect everything.

--- End quote ---


@JayBee pending your tutorial on how to build it, you can make a list of the rest of the components needed to create your homemade circuit?
thanks a lot :)
Mysli0210:

--- Quote from: JayBee on January 16, 2020, 11:42:58 am ---Dude I did check your photo already, but 1. We can barely see anything in them, and 2. I used TV as a generic term, TV or simple screen doesn't matter on this system.

What matters is the aspect ratio of the content vs the aspect ratio the screen.
Since the mouse absolute position (or joystick axises in joystick mode) is relative to the content aspect ratio/resolution, but the aiming detection is relative to the aspect ratio detected with the 4 LEDs.
So if your content isn't stretched fullscreen, my sketch won't be able to match aiming and cursor position.
And the center is always in the center of the 4 LEDs no matter the screen or content.

That's why I added a quick aspect ratio correction switch (with one calibration button push) to prevent this issue and still have accurate aiming without calibration, mainly for 4:3 contents displayed in 16:9 screens.

Have you tried stretching your games fullscreen for test purpose?

EDIT: As for forced calibration, the one from the 2 point sketch seemed to work perfectly fine, the only real problem i had with the 2 point sketch was that you'd have to be further away from the screen to aim at the opposite side of the screen, from the leds that is.
Send me pics or video of how it behaves in full screen mode.

I've tested it with a 17" 4:3 screen with ~2cm border, and I had minimal offset on the sides.

Mamehooker is a Windows app that works independently from Mame. But yes it won't work with retropie. And I agree libretro mame cores are bad, outdated, not optimized and have awful latency.

I consider adding a forced calibration mode for anybody who has unusual screen ratio or larger borders. It might make it easier to fit any setup, but might also make it easier to mess things up if the calibration isn't done correctly.

--- End quote ---

Well sorry, it must have been misinterpreted, didnt mean any offense.
As for the content, i tried with rescueshot for psx rendered in 1280x1024 ie. 5:4 in fullscreen.
but to debug it i just tested it on the desktop of the machine so i could accurately tell what was wrong.
I get that the mouse coordinates are defined in as absolute coordinates and that the center of the leds are always center of the coordinate system(therefor the individual axis is scaled according to the led position), except for the calibration offset, right?

I'll get some pics/video taken shortly :D

EDIT: I dont think forced calibration is a bad thing to have, i mean, what can it fook up?
on the 2 point sketch, it worked perfectly, IMO the only thing that the 2 point did poorly was track beyond the cameras limits... durrh :D

On these 4 pics i aim exacly at the border of the screen, as accurately as the ironsights on the gun allows for.


JayBee:

--- Quote from: Mysli0210 on January 17, 2020, 11:49:27 am ---Well sorry, it must have been misinterpreted, didnt mean any offense.
As for the content, i tried with rescueshot for psx rendered in 1280x1024 ie. 5:4 in fullscreen.
but to debug it i just tested it on the desktop of the machine so i could accurately tell what was wrong.
I get that the mouse coordinates are defined in as absolute coordinates and that the center of the leds are always center of the coordinate system(therefor the individual axis is scaled according to the led position), except for the calibration offset, right?

I'll get some pics/video taken shortly :D

EDIT: I dont think forced calibration is a bad thing to have, i mean, what can it fook up?
on the 2 point sketch, it worked perfectly, IMO the only thing that the 2 point did poorly was track beyond the cameras limits... durrh :D

On these 4 pics i aim exacly at the border of the screen, as accurately as the ironsights on the gun allows for.

--- End quote ---
Thanks for the pics! And very nice cab by the way  :applaud:
There is indeed a weird offset between the led and the border, which clearly shouldn't be that high. Do you get to the borders when you aim for the LEDs instead?  :P

Anyway, I will take some time today to try adding a calibration system.
But I have one question;
There are two ways of keeping the calibration data;
Just save it in the RAM, meaning you have to calibrate every time you plug the gun, like with samco system, or save it in the ROM, meaning it will auto reload every time you plug the gun, the same way as the sensor calibration does. It also means that if you mess up the calibration it will be unusable until you redo it correctly.

I was thinking of making the screen calibration optional, just after the sensor calibration. And resetting it to zero when you start the calibration then cancel it. What do you think?

Edit: I updated the firmware with a new screen calibration option that might be useful for you, check the op ;)
I also updated the post itself to make it cleaner.
More to come soon.
Mysli0210:
Thanks, it has a few super neat secrets within, which you'll get pics of later  :)
Yeah i get to border of the screen when I aim for the leds.

Saving calibration to ROM don't seem like a bad idea, the only negative I can think of is ROM cell wear around 100-200K writes per byte. However I think you could justify getting another pro micro by then... Or we could make it use an external EEPROM via the i2c that the camera already uses and potentially the nunchuck.

I'll check the new firmware out tonight  :D
Navigation
Message Index
Next page
Previous page

Go to full version