Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: SAMCO DIY Arduino Powered IR Light Gun  (Read 29445 times)

0 Members and 1 Guest are viewing this topic.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
SAMCO DIY Arduino Powered IR Light Gun
« on: June 17, 2019, 09:23:33 am »
Hi Guys,

I'm currently working on an Arduino powered light gun for use use on Windows & RetroPie have a look at the demo here.



Let us know what ya think, anyone keen to have a crack at building this? I hope to have a build guide up soon.


Cheers Sam

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #1 on: June 17, 2019, 07:59:49 pm »
That's really impressive man.  We are starting to move away from ir-based systems due to the issues that usually revolve around them, but a diy gun is a really good idea.  I look forward to the guide. 

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:September 19, 2020, 05:10:21 am
  • Chihiro ftw
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #2 on: June 18, 2019, 05:28:35 am »
Nice work.
I am assuming you are using the DFRobot IR positional camera, that returns positions of the 4 brightest infrared points?
One problem I saw with that approach was, that the field of view is pretty narrow ( almost as narrow as the wiimote`s field of view ).
The result of your work should be pretty comparable with the aimtrak lightguns, probably even in cost.

Don`t get me wrong, I really like it; however when I see an approach I almost have to point out what I think could be problems...
 :laugh:
thet0ast3r

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #3 on: June 18, 2019, 07:16:39 am »
Nice work.
I am assuming you are using the DFRobot IR positional camera, that returns positions of the 4 brightest infrared points?
One problem I saw with that approach was, that the field of view is pretty narrow ( almost as narrow as the wiimote`s field of view ).
The result of your work should be pretty comparable with the aimtrak lightguns, probably even in cost.

Don`t get me wrong, I really like it; however when I see an approach I almost have to point out what I think could be problems...
 :laugh:

Thanks Man, yeah you're bang on. The project as it stands is very similar to a Aimtrak. I just wanted to make a gun that was as plug and play as possible, that people could customise as they need and hopefully improve on as I found out more. I've already found a wiiMote hack that uses 4 iIR leds as opposed to 2 which looks promising. But I think the real main reason is that I'm just nerd and wanted to have a crack at building one these myself  :lol

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:September 19, 2020, 05:10:21 am
  • Chihiro ftw
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #4 on: June 18, 2019, 09:10:12 am »
Yeah, the problem with 4 points is: (or atleast my problem was)

I could not solve the Perspective n Point problem for 4 points on an arduino in real-time ( 60 fps) as it involves quite a lot of math.

https://en.wikipedia.org/wiki/Perspective-n-Point

I haven`t looked into it, but it  might be possible to solve it via lookup-tables? could be close to the computational limits of an arduino though.
Keep us updated if you manage to implement anything. :)
thet0ast3r

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #5 on: June 23, 2019, 08:33:51 am »
Hi Guys, just a quick update. Build Guide is now available...

meltman

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 237
  • Last login:August 21, 2020, 11:29:25 am
  • Brilliant!
    • forum.arcadecontrols.com/index.php/topic,158544.0.html
    • My arcade gallery
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #6 on: June 28, 2019, 04:33:49 pm »
Fantastic work man.

Dam0

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:August 04, 2020, 05:48:39 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #7 on: July 06, 2019, 02:42:49 am »
nice, ive ordered the bits, cant wait.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #8 on: July 28, 2019, 08:45:25 am »
Hey Guys, just another quick update. PlayStation 1 & SEGA Saturn setup video is now up!


Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:July 28, 2020, 10:46:16 am
  • Arcade enthusiast !
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #9 on: July 29, 2019, 05:35:39 am »
Really nice Samco, thanks for your sharing! I have already got all parts, but still no time to test.
It only seems, that the cursor is a little bit jittery, do you think, it can be made more smooth (maybe a simple smoothing algorithm in the sketch)?

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #10 on: July 29, 2019, 07:00:34 am »
Thanks @Ginsonic, I'd love to know how ya go!

Yeah, I did play around with smoothing a little bit but as I use it for gaming I didn't want to add any latency, and I don't really notice the jerking that much when I'm actually playing (generally play with cross hairs off when I can). However, if you're using this for something else like a dedicated mouse cursor, then yeah, a smoothing script is probably a good idea as currently double clicking an icon is near impossible. I used this library https://github.com/MichaelThessel/arduino-analog-smooth when I was when I was mucking around with it.

Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:July 28, 2020, 10:46:16 am
  • Arcade enthusiast !
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #11 on: July 29, 2019, 08:12:06 am »
I usually take a bunch of analog values in a loop (about 5-10) and then divide the total by the count of measures. Mostly simple and effective, but I will see, as soon as I have finished my MPU6050 based XInput Lightcannon project (similar to a Deadstorm Pirates control panel including a steering wheel ;) )

http://www.ifunpark.com/wap/eacp_view.php?id=81
« Last Edit: July 29, 2019, 08:14:03 am by Ginsonic »

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #12 on: August 09, 2019, 09:07:06 am »
This looks great.

Have you given any more thought to using the 4 leds discussed above?

If it increased accuracy above what you typically get from guns like the Aimtrak then it would be even better.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #13 on: August 11, 2019, 04:25:16 am »
Yeah, I'm still looking into a 4 LED option but I'm actually pretty happy with the accuracy now. Good timing really I've just uploaded a video which demonstrates it pretty well...



Still looking into the 4 LED version thou because as it will shorten the distance you have to be away from the screen (current version is about 2.5 screen widths) and possibly even reduce latency.

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #14 on: August 11, 2019, 06:11:44 am »
Hey, That looks great.

How does it cope if you move position? Thats always the shortfall with the aimtraks etc. If you shift a little way from where you calibrated the gun then the accuracy goes way off so I was just wondering how well it handles that?
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #15 on: August 14, 2019, 04:31:22 am »
Thanks lightgungamer!

To be honest this was something that I really hadn't checked too much before, so just had to do a quick test. The LED's I use from Adafruit don't have a particularly wide viewing angle but if I go from maximum left position (gun pointing just left of screen when straight on) and maximum right position (opposite for right position) it doesn't seem to change all that much. However if I go from sitting to standing there is a decent change, curser probably moves about 20 pixels down. Not sure how this compares to the Aimtrak?

I'm currently looking for wider angle LED's for the sensor bar, so when I find them I can do some better tests.

Cheers

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #16 on: August 17, 2019, 09:57:36 am »
That sounds really good to be honest.

I havenít had a chance to do a proper test but I always noticed the drift when moving side to side more.

Iíve been trying to get my head round how it works out the position and it seems like you could account for sideways movement based on the previewed distance between the LEDs but I canít think of anything that could deal with up and down movement if the leds at on the same level.

Iíve ordered the pcb from you so Iím going to give this a go and build it.
Iíve started a write up on my site here https://lightgungamer.com/how-to-build-your-own-lightgun/

Iím going to add more to it once Iíve got it built.

One thing I was wondering though is if you think the M4 board would work for the build as the M0 seems to be out of stock.

I love what you are doing here. Apart from anything else, itís a really accessible way for people to have a go and play around with this.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #17 on: August 19, 2019, 08:54:41 am »
Yeah, it's super hard to get your head around and then throw in tilt correction it's even tricker. I will make a sort video on how the tilt correction works eventually :)

That's so cool you got PCB, I'd love to know how you go. I'll be really interested to see how you feel the SAMCO compares to other guns you've tried. And yes did a quick check for you the ItsyBity M4 has exactly the same pinouts as the M0 and and from what I can tell doesn't share any of the pins I used with I2C (the reason why the AtMega32u4 doesn't work unfortunately) so you can use the exact same sketch.

Also thanks for the review & general interest in the project. I really appreciate it!

I really like what your doing with your page too. Lots of resources to get even more light gun games up an running :)
« Last Edit: August 19, 2019, 09:36:59 am by samco »

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 130
  • Last login:September 24, 2020, 02:35:46 pm
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #18 on: August 21, 2019, 06:00:05 am »

Excellent work there samco, I've picked up a couple of Namco Guncon but as my intention would be for my kids to use it then the issues with height would show up as the guns are passed around so i might wait till its tweaked out or they get bigger :D

One thing I did like about your approach is the us of arduino, my limit to programming was typing basic listings printed in C&VG magazine into my ZX Spectrum back in the 80's but could that arduino be programmed to interface with different consoles much like the Kade did as a joystick encoder. With the rise in Retro CRT's becoming hard to find and expensive a Lightgun that imitates a joystick/mouse sounds like a winner

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #19 on: August 21, 2019, 09:08:55 pm »
I'll answer that one...Ö  If the games in question could also be controlled via an analog stick then yes, but if it's light gun only then probably not.  Most light guns simply send two inputs to a console..... when the trigger is pressed and when the light sensor sees light.  The timing of one vs the other is used by the game to calculate position.  Since there isn't a way to fake that it won't work easily.  If the game allows joystick support then it could work.

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 130
  • Last login:September 24, 2020, 02:35:46 pm
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #20 on: August 22, 2019, 04:41:17 am »

Thanks Howard, yeah I was thinking more along the lines of PS1, PS2, Dreamcast and OGXbox where most, if not all games would have a joystick control option.
I think that with Sinden on the Horizon people are just waiting to see what it's like or if we can make our own, from what I'm aware it needs other software running so that makes it a no go for older sytems but this with the arduino could make it perfect for those wanting to play their old games on an LCD

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #21 on: August 22, 2019, 07:27:10 am »

Thanks Howard, yeah I was thinking more along the lines of PS1, PS2, Dreamcast and OGXbox where most, if not all games would have a joystick control option.
I think that with Sinden on the Horizon people are just waiting to see what it's like or if we can make our own, from what I'm aware it needs other software running so that makes it a no go for older sytems but this with the arduino could make it perfect for those wanting to play their old games on an LCD
Andy , the creator of the Sinden Lightgun had demoed a poc bit of hardware using a pi that works with ps1 and ps2. I think he said it would theoretically work with other consoles.
I would have thought that this gun(Samco) would be able to work with the ps2 as the aim track gun that works in a similar way does, at least with some games.
You can also play pretty much all the old Lightgun games using an emulator but were you more interested in using the original hardware?
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 130
  • Last login:September 24, 2020, 02:35:46 pm
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #22 on: August 22, 2019, 08:09:01 am »

I was under the impression that there was extra software running on top of the emulator(the white border) so dont know how that would be replicated on other consoles.

I still have my saturn and dreamcast consoles along with guns and a CRT, digging them out to set up would be a pain though so anything I do would be on the PC/RPI. There is a market out there though for the consoles I mentioned before, people are spending quite a few pennies for usb/sd , psu and HDMI mods for the likes of Dreamcast and there's also a guy who converts dreamcast guns to work on lcd and are bluetooth. I believe there is a market there for something like this where someone just needs to flash a firmware to get it to work on another console

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #23 on: August 22, 2019, 08:26:04 am »
I think the Sinden mod adds the border using an OSSC chip as well as handling the output. I could be wrong.
Hereís the video of the mod.
http://www.sindenlightgun.com/blog/playstation-1-and-2-original-console-sinden-lightgun-support/
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #24 on: August 22, 2019, 12:50:34 pm »
I would also point out that most (not all) light gun games from the newer systems are ports of arcade games that are already emulated.  If anything a gun solution for older systems is what's needed... if you insist on playing on original hardware anyway. 

For me anyway I would want to setup a small dedicated light gun pc that could just be pulled out and plugged up to the tv when I want to play those games.  Every game would just be on there ready to go.  I mention this because you have to remember that most consoles have 15-20 gun games on them max..... you'll probably only want to play one or two of them.  It's really not worth it swapping around cables and ect. 

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #25 on: August 22, 2019, 03:45:29 pm »
Yeah, getting one system setup where you can play everything seems like the best option.
The only thing is that it can be hard to get all the emulators set up perfectly so it all just works. Fiddling around with settings between games can be fun but it does take away from the arcade feel.
Iím hoping the Sinden gun makes it a lot smoother or consistent at least.

I really like this project though as it will give us complete control. Ive got all the parts ordered and Iím even hoping to get into the code once Iíve got it working.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #26 on: August 24, 2019, 04:26:01 am »
Hi Guys, loving the chat :)

Yeah, Howards right my Gun simply emulates a mouse so the actual emulator is doing a lot of the work when comes to actually emulating a light gun (which works in quite a different fashion, this video explains it really well youtube.com/watch?v=DzIPGpKo3Ag) there would have to another step in the hardware that would convert the mouse position to this timing based system which is what I assume the Sinden guy is going to implement. The other problem is my gun requires a point on the screen to calibrate to which the old light guns didn't have.

So the SAMCO in it's current state is pretty much emulator only. But who knows is the future maybe it'll evolve, thats the joy of open source :)


lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #27 on: September 05, 2019, 10:19:22 am »
Hey Sam,
Iíve got all my components ready now so Iím going to start building it soon.

One thing I was wondering though is if it would work with a wii sensor bar? Itís just 2 clusters of ir leds.

Have you tried it?
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #28 on: September 06, 2019, 05:51:30 am »
Hey man, I actually just bought a cheap aftermarket Wii sensor from AliExpress which has the  /|\   /|\ kind of configuration to try out and I was surprised it worked perfectly. Also increases the angle you can use it at however when you jump from the front facing leds to the left/right pointing ones with recalibrating alignment does go out a fair bit. Have fun putting it all together :)
« Last Edit: September 06, 2019, 05:53:56 am by samco »

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #29 on: September 20, 2019, 10:06:57 pm »
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 a couple of images 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.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #30 on: September 28, 2019, 02:34:25 am »
Funny I was doing the exact same thing for my light guns  :lol
I also added a plug just outside of the gun to plug/unplug it at will  8)

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 130
  • Last login:September 24, 2020, 02:35:46 pm
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #31 on: September 29, 2019, 07:22:27 am »


Same here, I was also thinking that i could just reuse the original cable, solder a USB plug onto it and run a cable from that with a socket on the end for the pedal

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #32 on: October 02, 2019, 12:54:35 am »
Hey I haven't looked at the sketch, but what programming language are you using?  I ask because I have Arduino code on this pc somewhere from my racing rig that allowed communication to/from mamehooker via virtual serial port.  If it's added mamehooker can optionally control the recoil.  Just a thought... you may not be that far along yet. 

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #33 on: October 02, 2019, 12:59:31 am »
Hey I haven't looked at the sketch, but what programming language are you using?  I ask because I have Arduino code on this pc somewhere from my racing rig that allowed communication to/from mamehooker via virtual serial port.  If it's added mamehooker can optionally control the recoil.  Just a thought... you may not be that far along yet.
That's very interesting stuff, I didn't know you could interface mame like this!
SAMCO's Arduino sketch as well as mine are using the Arduino IDE and C++, and we can indeed communicate with serial through USB.

I would gladly see the sketch you made for that, that would help immensely :D
« Last Edit: October 02, 2019, 05:24:22 am by JayBee »

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #34 on: October 02, 2019, 08:47:33 am »
Hi Howard,

Yeah, that would be great. JayBee from the post above has already started working on a recoil system. I haven't looked into yet to be honest but it's good to know that it's possible.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #35 on: October 02, 2019, 10:14:44 am »
Hi Howard,

Yeah, that would be great. JayBee from the post above has already started working on a recoil system. I haven't looked into yet to be honest but it's good to know that it's possible.
Indeed, I already made a fully working recoil system with simple 24v solenoids and a small DIY control board.
The recoil activation and timing is controlled by the Arduino, so if I can make it communicate with Mamehooker, it should work great.
I will share the schematics later in my other posts, when I am sure it's working fine after few hours of use.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #36 on: October 03, 2019, 01:13:09 pm »
Ok. 

Obviously it's going to have to be modified a little for recoil so I might try to change it a little before I post it. 

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #37 on: October 03, 2019, 01:37:42 pm »
Ok. 

Obviously it's going to have to be modified a little for recoil so I might try to change it a little before I post it.
Awesome, thank you!
Looking forward to see your code, communicating with mame and other emulators is the last feature I miss in my 4 led setup ;)

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #38 on: October 10, 2019, 10:49:12 am »
Ok. 

Obviously it's going to have to be modified a little for recoil so I might try to change it a little before I post it.
Is there anything special to do in mame64 to make it work with mamehooker?
I followed your tutorial, setup the mame path and all, but when I launch a game in mame, mamehooker doesn't react, no sound, no voice, nothing. And no ini file created either.
Did I miss a step somewhere?  :dunno

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #39 on: October 12, 2019, 01:46:53 pm »
Yes, set output to "windows" in your mame.ini and/or the command line.  There's a sticky about it over in the software forum. 

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #40 on: October 13, 2019, 11:20:52 am »
Yes, set output to "windows" in your mame.ini and/or the command line.  There's a sticky about it over in the software forum.
Ah that explains it. Thanks, now it's working great ;)

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #41 on: October 15, 2019, 07:13:00 am »
Hey Guys, Got my PCSX2 setup guide up for anyone that's interested.



JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #42 on: October 16, 2019, 02:06:40 am »
Hey Guys, Got my PCSX2 setup guide up for anyone that's interested.


So you are actually getting an accurate aiming in PCSX2 by calibrating like that?
That's awesome man! Glad you made it work ;D

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #43 on: October 17, 2019, 02:12:39 am »
@JayBee Yeah, bonus of calibrating in game in guess :) It is quite annoying that mouse is slightly off in most games but as long as calibrate to the little red cross on the calibration screen you should be all good.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #44 on: October 18, 2019, 10:50:26 pm »
@JayBee Yeah, bonus of calibrating in game in guess :) It is quite annoying that mouse is slightly off in most games but as long as calibrate to the little red cross on the calibration screen you should be all good.
I just tested pcsx2. I feel a bit dumb, last time I tested I forgot to disable the widescreen hacks, reason why it wasn't aiming properly. Without it it's working perfectly  ::)
Still looking for a way to play those games correctly in 16/9 tho, it would look great.

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #45 on: October 20, 2019, 07:23:16 am »
@JayBee Yeah, bonus of calibrating in game in guess :) It is quite annoying that mouse is slightly off in most games but as long as calibrate to the little red cross on the calibration screen you should be all good.
I just tested pcsx2. I feel a bit dumb, last time I tested I forgot to disable the widescreen hacks, reason why it wasn't aiming properly. Without it it's working perfectly  ::)
Still looking for a way to play those games correctly in 16/9 tho, it would look great.
Hey JayBee

What problem are you having with 16:9?
You can set the aspect ratio in the be window settings.
You can also set the window size.
I havenít found it necessary but you can also set a custom internal resolution in the video plugin settings.

Just setting the 16:9 aspect ratio works for me though.

If you are having trouble where the aim is fine in the Center but drifts off on one or more axis as you go towards the edge then you need to tweak the 4 values in the gun on profiles for the game that you are using to get the aim consistent for your screen set up.

Which game are you trying?


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #46 on: October 20, 2019, 07:40:41 am »
Samco - I meant to say that I got all of the parts and managed to build a copy of your gun.

Its almost working but I've obviously done something wrong as the camera doesn't seem to get consistent power. I think I haven't soldered it very well (Its the first time that I have soldered anything in years!)

It works for a few seconds but then when it temporarily loses power to the camera (the red camera light flickers) the whole thing stops working. Would that be the behavior you would expect if it was losing power to the camera?

https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #47 on: October 20, 2019, 10:53:54 am »
@JayBee Yeah, bonus of calibrating in game in guess :) It is quite annoying that mouse is slightly off in most games but as long as calibrate to the little red cross on the calibration screen you should be all good.
I just tested pcsx2. I feel a bit dumb, last time I tested I forgot to disable the widescreen hacks, reason why it wasn't aiming properly. Without it it's working perfectly  ::)
Still looking for a way to play those games correctly in 16/9 tho, it would look great.
Hey JayBee

What problem are you having with 16:9?
You can set the aspect ratio in the be window settings.
You can also set the window size.
I havenít found it necessary but you can also set a custom internal resolution in the video plugin settings.

Just setting the 16:9 aspect ratio works for me though.

If you are having trouble where the aim is fine in the Center but drifts off on one or more axis as you go towards the edge then you need to tweak the 4 values in the gun on profiles for the game that you are using to get the aim consistent for your screen set up.

Which game are you trying?


Sent from my iPhone using Tapatalk
You're right, I didn't touch the settings of the plug-in yet, I wanted to see how it was working without changing anything.
The issue I get in pcsx2 is that when I use the widescreen hacks and 16:9 ratio for timecrisis 3 (I must admit it's the only ps2 lightgun game I tested so far), even if the game is displayed well in full 16:9, the lightgun is still registered only in the 4:3 zone of the screen, as it was intended in the original game.
So the aiming is perfect, but I can't shoot on the left and right borders  ::)
Back with native 4:3 it works perfectly.
I will follow your advice and try to change the settings to see if I can make the aiming fit the 16:9 aspect.

For your camera issue, I would check the soldering first, to see if you have no short circuit or bad connection, the led of the camera should be either always on when it's working, or always off. Do you have a multimeter or a continuity tester that you can use?

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #48 on: October 20, 2019, 06:28:54 pm »
Iíve definitely had that same problem before but I canít remember how I fixed it. I might have just deleted my install and started fresh.

Iíve just tried it with and without the full screen hacks and it doesnít seem to make any difference. It works both ways for me.

I would check internal and window resolution and make sure they are both at least in a 16:9 ratio.

Re the camera - I think you are right. I donít have a multimeter but Iím planning on getting one so I can check. I think that must be it because if I press it at an angle then it seems to fix the connection. I canít see anything wrong visually though.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #49 on: October 20, 2019, 10:47:09 pm »
Hi Lightgungamer,

Yeah, from your description (especially the part about pressing on it fixes it) it sounds like it probably is a soldering issue. Because your getting power intermittently it must be close to connection thou, maybe try reheating your soldering points. Power is supplied to the camera from pin "5" in my sketch so maybe start with that.


lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #50 on: October 22, 2019, 02:52:49 pm »
Thanks for the reply samco.

I got a multimeter and have started testing it.

Iíve been testing the connection between pin 5 and the + pin on the camera. It sits at about 1.5v normally then goes to about 2.5 when I press on it.
So it seems like the power getting through is the problem but probably not that connection?

This might be a silly question but should I have soldered every single pin on the board or just the ones that seem to be connected to something else on the pcb.

Iíve only soldered the ones with obvious connections.

Sorry if thatís obvious but Iím a total newb with electronics.

Thanks
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #51 on: October 22, 2019, 05:06:43 pm »
I fixed it! I soldered the remaining pins and that fixed it.

Now Iím just having problems with the leds.

It works in terms of calibrating if I use the actual miracle led bar but obviously that doesnít aim consistently because it has a funny led configuration.

When I switch to the leds that I wired up, I get nothing in terms of the raw input to the serial monitor.

Iím not sure how to test the leds given I canít see if they should be lit up.

Does anyone know what voltage I should expect to get out of the usb cable?
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #52 on: October 22, 2019, 08:06:11 pm »
Many phones and digital cameras can see IR light, so that might help you out. 

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #53 on: October 23, 2019, 05:40:58 am »
@lightgungamer Nice! Hopefully we're almost there. Here's a couple of things to try...

- Like Howard said (thanks by the way) some digital cameras (usually older ones) can see IR light. You should be able to see it as a purple glow through the view finder.

- LED's have a polarity so check you have soldered them the right way round, there should be a flat edge and a round edge. The flat edge should be closest to the SAMCO logo.

- It could also be that the wii sensor is working fine (my after market one from AliExpress works great, but maybe miracle bars are different) and you have either interference (like a window behind your screen or a bulb to close) messing with your signal...

- ...or you're not far enough back. You have to be a fair way back from your screen (about 2.5 screen widths) to reach all corner of the screen. You can test this by pointing at all four corner and making sure your raw values are still ticking over.

Hopefully one of these helps. If not let me know and I can send you over a new sketch to upload and run you though a program called processor that will show you exactly what you camera can see and we can work it out from there. It's a bit involved thou so hopefully one these work :)

Oh, and USB should give you 5V.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #54 on: October 23, 2019, 09:06:21 am »
I just thought of one other thing. And that's to make sure your camera is up the right way up (apparently some of the stickers on these camera are not quite right). If your camera is installed correctly the red light on your camera should closest to the left wall of your gun when holding it in a shooting position, hopefully that makes sense. Anyway, good luck and let me know how ya go :)

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #55 on: October 23, 2019, 12:02:06 pm »
Thanks samco.

I tested the power coming from the usb cable and it seems too low so I think it might be a problem with the cable I used.

Did you say that a wii bar should work?  I thought that the multiple leds in the would be an issue?
If not Iíll try that as I have one lying around.

It was the aimtrak bar that I used and it was detecting it but jumping around.
Iím wondering now though if thatís the camera rotation. I think the led power light is at the top.

I just need to wait until I get home to check.

Thanks for the tips. Iím nearly there!

Thanks @howard_casto as well for the tip. My current phone doesnít seem to detect it but I have an older one that I can try somewhere.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #56 on: October 23, 2019, 12:19:20 pm »
I just thought of one other thing. And that's to make sure your camera is up the right way up (apparently some of the stickers on these camera are not quite right). If your camera is installed correctly the red light on your camera should closest to the left wall of your gun when holding it in a shooting position, hopefully that makes sense. Anyway, good luck and let me know how ya go :)
Oh I completely forgot something important, some recent batches of this camera have the camera tilted (manufacturer porblem), so if it works weird with camera in the right orientation, just tilt it 90į left or right, and it should be working.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #57 on: October 24, 2019, 05:50:25 pm »
Thats great man! Yeah, I've been using this one from aliexpress https://www.aliexpress.com/item/32963414424.html?spm=a2g0s.9042311.0.0.7ce44c4dEOVMFi which only has the 6 leds and it works great. I'm pretty sure most of the proper wii ones have an extra 4 leds but I think they should still work can't confirm thou as I haven't been able to test. From what I can tell I don't think the aimtraks will work thou, due to the different layout of Leds.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #58 on: October 26, 2019, 06:31:57 pm »
Do you think it would be possible to use an Arduino to make a Guncon 3 work on a Windows PC?

I have been after a solution for this for a while. Someone was able to make one work on a Linux pc by writing custom drivers. How hard would it be to make an Arduino translate Guncon 3 traffic to move a mouse cursor or act as an analog joystick in Windows?


hyo2012

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:September 18, 2020, 01:14:34 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #59 on: October 27, 2019, 10:29:49 am »
Wow.. handmade custom lightgun! I just ordered component you mentioned.

By the way, I have a question.

Is this lightgun have a off-screen reload function?

Off-screen reload is... when IR camera can't find LED module, pulling trigger act like right mouse click, not left click.


lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #60 on: October 27, 2019, 12:15:10 pm »
Do you think it would be possible to use an Arduino to make a Guncon 3 work on a Windows PC?

I have been after a solution for this for a while. Someone was able to make one work on a Linux pc by writing custom drivers. How hard would it be to make an Arduino translate Guncon 3 traffic to move a mouse cursor or act as an analog joystick in Windows?

Why would you want that? This gun works in a similar way to the gcon 3 anyway and if you wanted, you could put it in the shell.

Iíd be more interested in having this emulate the gcon3 outputs so you could use it on the PS3.

I think thatís a difficult thing to do though. I think I remember reading about someone trying to make some Windows drivers for the gcon 3 and they struggled because the traffic was encrypted or something.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #61 on: October 27, 2019, 03:15:31 pm »
Do you think it would be possible to use an Arduino to make a Guncon 3 work on a Windows PC?

I have been after a solution for this for a while. Someone was able to make one work on a Linux pc by writing custom drivers. How hard would it be to make an Arduino translate Guncon 3 traffic to move a mouse cursor or act as an analog joystick in Windows?

Why would you want that? This gun works in a similar way to the gcon 3 anyway and if you wanted, you could put it in the shell.

Iíd be more interested in having this emulate the gcon3 outputs so you could use it on the PS3.

I think thatís a difficult thing to do though. I think I remember reading about someone trying to make some Windows drivers for the gcon 3 and they struggled because the traffic was encrypted or something.


Sent from my iPhone using Tapatalk

The shell is the very last thing I'd want from a Guncon 3. It's just the only home IR gun I have used that is accurate enough to play shooting games without crosshairs on-screen. As it's a USB device, I have been hoping someone would figure out drivers for Windows.

As I already have two, it would be nice to be able to use them with some Teknoparrot shooters. It kinda sucks that they only work with 3 PS3 games.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #62 on: October 27, 2019, 08:06:49 pm »
What you would probably find is that 98% of that accuracy was in the software and thus unless the driver code was really well written they wouldn't behave like you want them to.  Light gun ports on the wii were fantastic, but playing the same games on the pc with homebrew wiimote drivers.... not so much. 

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #63 on: October 28, 2019, 12:10:25 am »
Do you think it would be possible to use an Arduino to make a Guncon 3 work on a Windows PC?

I have been after a solution for this for a while. Someone was able to make one work on a Linux pc by writing custom drivers. How hard would it be to make an Arduino translate Guncon 3 traffic to move a mouse cursor or act as an analog joystick in Windows?

Why would you want that? This gun works in a similar way to the gcon 3 anyway and if you wanted, you could put it in the shell.

Iíd be more interested in having this emulate the gcon3 outputs so you could use it on the PS3.

I think thatís a difficult thing to do though. I think I remember reading about someone trying to make some Windows drivers for the gcon 3 and they struggled because the traffic was encrypted or something.


Sent from my iPhone using Tapatalk
Can't we already do that with RPCS3?

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #64 on: October 28, 2019, 03:50:26 am »
Do you think it would be possible to use an Arduino to make a Guncon 3 work on a Windows PC?

I have been after a solution for this for a while. Someone was able to make one work on a Linux pc by writing custom drivers. How hard would it be to make an Arduino translate Guncon 3 traffic to move a mouse cursor or act as an analog joystick in Windows?

Why would you want that? This gun works in a similar way to the gcon 3 anyway and if you wanted, you could put it in the shell.

Iíd be more interested in having this emulate the gcon3 outputs so you could use it on the PS3.

I think thatís a difficult thing to do though. I think I remember reading about someone trying to make some Windows drivers for the gcon 3 and they struggled because the traffic was encrypted or something.


Sent from my iPhone using Tapatalk
Can't we already do that with RPCS3?

Does rpcs3 have lightgun support?
I havenít tried it yet.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 316
  • Last login:Today at 01:49:30 pm
  • If I can't buy it, I build it.
    • Github
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #65 on: October 28, 2019, 04:01:24 am »

Does rpcs3 have lightgun support?
I havenít tried it yet.

I saw somewhere that it has mouse support, so yes I guess, but I haven't tried it yet either, too busy configuring every game for Mamehooker lately :P

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #66 on: October 28, 2019, 04:54:17 am »

Does rpcs3 have lightgun support?
I havenít tried it yet.

I saw somewhere that it has mouse support, so yes I guess, but I haven't tried it yet either, too busy configuring every game for Mamehooker lately :P

I wasnít sure if it might be difficult if the drivers for the gcon were in the game.
I havenít been able to run it yet but Iím building a new system that should do it.
Iíll give it a try.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #67 on: October 28, 2019, 05:31:14 am »
@hyo2012 Awesome! I love to know how you go. Currently pointing off screen is setup to move the mouse to it's extreme co-ordinates when it cant see any leds (i.e. you've pointed off screen) and then you can shoot to reload as this was how all of the emulators/games that I've tried re-load system works. But I could write an alternative sketch that also makes the right mouse button click if need it. Just let me know if ya do.

@Zebra I haven't actually played with a GunCon 3 so I don't have any idea to be honest. But lucky if looks like you'll get some help here anyway :)

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #68 on: October 28, 2019, 05:41:06 pm »
What you would probably find is that 98% of that accuracy was in the software and thus unless the driver code was really well written they wouldn't behave like you want them to.  Light gun ports on the wii were fantastic, but playing the same games on the pc with homebrew wiimote drivers.... not so much.

That seems to be true with real light guns on consoles. Someone created patches to allow you to use a Namco Guncon 1 on games that only had support for Konami's Hyperblaster and the accuracy remained poor. It was nowhere near the performance when using the same gun on Time Crisis.

On the other hand, you get terrible accuracy with most 3rd party light guns on the PS2 but excellent accuracy when playing the same game with an official Namco gun. So, the gun hardware definitely matters. People also claimed huge differences between act labs accuracy and those Lik Sang guns they competed with.

I thought it was different with PC emulators though as they all seem to map gun controls to either a standard mouse or analog joystick. PC guns like Aimtraks, Act Labs and USB2GUN boards all act as a standard mouse or analog joystick so they are usually equally accurate for all games. If a good job was done on the Windows drivers, would this not also be the case for a Guncon 3?

I've only used a Wii remote on a Wii but they are never accurate enough to use without crosshairs on-screen. It's hard to say if Namco would have been able to make a Wii remote work as well as a GC3 for Time Crisis 4. I think there is a hardware limitation in there somewhere that prevents it though. The Wii remote performs poorly on all Wii light gun game ports.

pbj

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9650
  • Last login:Today at 03:02:35 pm
  • Obey.
    • The Chris Burke Band
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #69 on: October 28, 2019, 06:03:05 pm »
Guns worked well on the Wii games that were designed around being on the Wii.  Big Buck Hunter was actually pretty damn fun.

This forum needs more threads about Arcade 1Up cabinets.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #70 on: October 29, 2019, 01:41:35 pm »
Guns worked well on the Wii games that were designed around being on the Wii.  Big Buck Hunter was actually pretty damn fun.



They work OK if you play with crosshairs on-screen but accuracy is not required for that. It's fine for a lot of people but, for some reason, I find it hard to enjoy shooting games with crosshairs on-screen if the original arcade didn't have them. It just makes them too easy and it feels like I'm using a mouse instead of a gun. It's why I don't like using my Aimtrak to play Time Crisis in mame.

It's a shame because the Wii is the only console for a bunch of arcade shooters. I know of no other way to play games like Terraburst and Op Thunder Hurricane or Ghost Squad.

The PS3 has a bunch of gun games too but most of them use the PS Move which is only a little better than the Wii remote. A lot of it's games would have been worth playing if they would have added an option to use a Guncon 3. The key difference in the hardware seems to be that it uses two led clusters instead of one and they are spaced further apart.




Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #71 on: October 29, 2019, 01:52:04 pm »
I'm talking about arcade game ports that were released on the wii, not wii exclusive games.  The sega ones in particular.... if you calibrated in-game every time you played and didn't move around (in other words stand in the same spot) the accuracy was great... no cross hairs needed.  It wasn't the wii or it's OS software that increased the in-game accuracy, but rather the game's calibration code.  The reason wiimote games worked great on most first party Nintendo titles and the major developers that actually took the time to make good ports is because there was custom code made for each individual game to translate the mess of sensor data the wiimote fed back into good tracking. 

The reason homebrew drivers don't work well is because they typically just take the ir tracking data, bind that to a mouse axis and that's it.  If done correctly it should be far more complex. 

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #72 on: October 29, 2019, 03:19:56 pm »
I'm talking about arcade game ports that were released on the wii, not wii exclusive games.  The sega ones in particular.... if you calibrated in-game every time you played and didn't move around (in other words stand in the same spot) the accuracy was great... no cross hairs needed.  It wasn't the wii or it's OS software that increased the in-game accuracy, but rather the game's calibration code.  The reason wiimote games worked great on most first party Nintendo titles and the major developers that actually took the time to make good ports is because there was custom code made for each individual game to translate the mess of sensor data the wiimote fed back into good tracking. 

The reason homebrew drivers don't work well is because they typically just take the ir tracking data, bind that to a mouse axis and that's it.  If done correctly it should be far more complex.

OK you've peaked my interest in trying again with my Wii. I gave up on it after trying the House of the Dead games, Ghost Squad and Mad Dog McCree. Which disc would you recommend for me to try (to shoot without crosshairs). I have a bunch of ideas for a custom Wii arcade gun if I can find some games to make it worth the time.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #73 on: October 29, 2019, 03:55:10 pm »
I remember Ghost Squad being particularly good... it's really short though.  HOTD OK also worked well with the wiimote.  If you didn't find the accuracy acceptable then it might just be you never are. 

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #74 on: October 30, 2019, 01:45:43 pm »
Were you able to play Ghost Squad on the Wii without crosshairs? I couldn't find that option. I'm going to dig out my Wii and take another look.

My problem is that I'm spoiled by the PS1 and PS2 Guncon games. I was playing Virtua Cop 1 and 2 on the PS2 yesterday and it was pure magic. With the official Namco Guncon 2 in an arcade recoil gun shell it felt just like I was playing the coin-op. Every shot landed exactly where I aimed etc. I wish I could use that gun for all shooting games.

Still, it looks like we won't have to wait too long before we get an arcade-accurate home IR gun. Between the commercial projects like Sinden and the various diy projects I'm sure one if them will deliver. I want to try the 4 sensor diy design. If it works well, I could use it with a Wii emulator.

On a separate note, I noticed yesterday that the Raw ThrillS Terminator Salvation IR gun doesn't appear to use a separate I/O board like other arcade guns. The gun camera and all ten sensor boards run directly to the PC via a USB harness. The recoil is handled by a small "kick board" inside the gun shell and that also connects to the USB harness. Would it be possible to make the diy Samco gun without an Arduino and just run the code on the PC instead like the Raw Thrills gun?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #75 on: October 30, 2019, 04:22:13 pm »
There's no option to turn it off.... I believe it even had cross hairs in the arcades due to how the game worked.... I just meant you could point and shoot without having to rely on it. 

As for all the new options on the way I hope they turn out ok, but I'll believe it when I have them in my hand. 

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #76 on: October 30, 2019, 08:39:45 pm »
There's no option to turn it off.... I believe it even had cross hairs in the arcades due to how the game worked.... I just meant you could point and shoot without having to rely on it. 

As for all the new options on the way I hope they turn out ok, but I'll believe it when I have them in my hand.

I feel the same. Manufacturers always claim that their gun controllers have unprecedented accuracy regardless if they are pin point or if you couldn't hit a bus with one. They often claim to be "arcade quality" too but when you get them in hand, you usually find yourself wondering if they have ever actually been to an arcade. It's getting hard to trust what they say.

To date there has only been two or three accurate home guns and none that are both accurate and arcade quality at the same time (without a diy transplant to an arcade gun shell).

Luckily for us there are still some trusting people who are prepared to be first adopters of the new guns based only on the manufacturers sales pitch. I'll wait to see what they have to say first. They are like the first penguin to jump through the ice into the ocean. The one that gets eaten by a seal but clears the path for the rest of the penguins. Never be the first penguin!




hyo2012

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:September 18, 2020, 01:14:34 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #77 on: October 30, 2019, 10:54:33 pm »
Were you able to play Ghost Squad on the Wii without crosshairs? I couldn't find that option. I'm going to dig out my Wii and take another look.

My problem is that I'm spoiled by the PS1 and PS2 Guncon games. I was playing Virtua Cop 1 and 2 on the PS2 yesterday and it was pure magic. With the official Namco Guncon 2 in an arcade recoil gun shell it felt just like I was playing the coin-op. Every shot landed exactly where I aimed etc. I wish I could use that gun for all shooting games.

Still, it looks like we won't have to wait too long before we get an arcade-accurate home IR gun. Between the commercial projects like Sinden and the various diy projects I'm sure one if them will deliver. I want to try the 4 sensor diy design. If it works well, I could use it with a Wii emulator.

On a separate note, I noticed yesterday that the Raw ThrillS Terminator Salvation IR gun doesn't appear to use a separate I/O board like other arcade guns. The gun camera and all ten sensor boards run directly to the PC via a USB harness. The recoil is handled by a small "kick board" inside the gun shell and that also connects to the USB harness. Would it be possible to make the diy Samco gun without an Arduino and just run the code on the PC instead like the Raw Thrills gun?

You can remove CrossHair on Ghost Squad Wii version by this way.

Game on -> Arcade -> Customize -> Aim Reticle off

 ;)

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 615
  • Last login:March 12, 2020, 07:10:43 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #78 on: November 03, 2019, 05:53:02 pm »
The wii version actually looks fairly playable on the Dolphin emulator:



Maybe I can leave my Wii packed up in a box somewhere and just play it's gun games on my PC with my preferred gun tech. I kinda like the original Ghost Squad arcade guns but used ones are still a bit pricey on ebay. Still, Ghost Squad has to be played with a machine gun so I might have to pony up for a cab.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #79 on: December 07, 2019, 12:47:31 am »
Hi Guys,

Just a quick update. I've added a test sketch to my GitHUb so anyone can test there gun is setup corectly before they upload the final code. Here's a short video on how it works.


samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #80 on: March 19, 2020, 12:56:28 am »
Hi Guys, it's been a while but I finally got around to updated my PCB boards to work with the ItsyBitsy 32u4 and probably more exciting than that I've also now got a new GunCon2 compatible board. Anyway here's a link to my new vid if you want to check them out.

Cheers Sam(co)


pepeporras

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:June 03, 2020, 12:05:22 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #81 on: March 21, 2020, 12:28:28 am »
Hi Samco, i have connected two guncon2 on my PC, no sensor bar, really lightgun 

« Last Edit: March 21, 2020, 04:15:51 pm by pepeporras »

pepeporras

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:June 03, 2020, 12:05:22 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #82 on: March 21, 2020, 08:54:11 am »
How to insert YouTube videos?

nipsmg

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1635
  • Last login:Today at 06:55:07 am
  • ROONEY!! ERRGH!!
    • Arcadia
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #83 on: March 21, 2020, 10:12:41 am »
Hi Samco, i have connected two guncon2 on my PC, no sensor bar, really lightgun  ;)

[youtube]http://www.youtube.com/watch?v=IxpMHORxmcQ[/youtube]

put the url without any tags.. no URL tag, no youtube tag, just the bare url. see:


Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 257
  • Last login:Today at 10:39:02 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #84 on: March 21, 2020, 12:31:28 pm »
Hi Samco, i have connected two guncon2 on my PC, no sensor bar, really lightgun  ;)

[youtube]http://www.youtube.com/watch?v=IxpMHORxmcQ[/youtube]
Pepe, how are you using those guns on the pc? Ems topgun driver?

pepeporras

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:June 03, 2020, 12:05:22 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #85 on: March 21, 2020, 04:17:26 pm »
Hi Samco, i have connected two guncon2 on my PC, no sensor bar, really lightgun  ;)

[youtube]http://www.youtube.com/watch?v=IxpMHORxmcQ[/youtube]

put the url without any tags.. no URL tag, no youtube tag, just the bare url. see:


Thanks bro  :notworthy:

pepeporras

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:June 03, 2020, 12:05:22 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #86 on: March 21, 2020, 04:28:34 pm »

Pepe, how are you using those guns on the pc? Ems topgun driver?

hello, yes, for the guncon2 use that driver but only with that driver it does not work well, I have created a code to flash the screen when shooting and another to delay the shot so that it enters the flash so that it detects the position well.

I am not going to talk about this here anymore, that this topic is from Samco, if someone wants to know more about this, speak to me privately or I will open a new topic if someone wants.

By the way Samco, your system is wonderful, as soon as the alarm passes, I will buy a couple of PCBs from their ebay store to test my LCD.

good job :applaud:

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #87 on: March 21, 2020, 05:06:32 pm »

Pepe, how are you using those guns on the pc? Ems topgun driver?

hello, yes, for the guncon2 use that driver but only with that driver it does not work well, I have created a code to flash the screen when shooting and another to delay the shot so that it enters the flash so that it detects the position well.

I am not going to talk about this here anymore, that this topic is from Samco, if someone wants to know more about this, speak to me privately or I will open a new topic if someone wants.

By the way Samco, your system is wonderful, as soon as the alarm passes, I will buy a couple of PCBs from their ebay store to test my LCD.

good job :applaud:
Hey, Iíd love to know more about this. How are you making it work?

It would be great if you wanted to start a thread or pm me if you donít want to.
Thanks.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 257
  • Last login:Today at 10:39:02 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #88 on: March 21, 2020, 06:02:14 pm »

Pepe, how are you using those guns on the pc? Ems topgun driver?

I am not going to talk about this here anymore, that this topic is from Samco, if someone wants to know more about this, speak to me privately or I will open a new topic if someone wants.
True, sorry, samco, sent you a pm, pepe.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #89 on: March 24, 2020, 11:45:10 pm »
Thanks Pepe! Your setup looks sweet, nice work!

Yeah, wonít be able to send out any PCBs for a while all inessential businesses have been suspended here in NZ for at least a month so had to shut down my eBay listing for now.

Stay safe out the peps, at least we now have more time for projects :)

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #90 on: May 01, 2020, 12:27:40 am »
Hi Guys,

Just a quick update, I've started selling my PCB's again...

https://www.ebay.com.au/usr/samcocontrollers

... and have made a 4 LED sketch (just encase you missed it) :)


lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #91 on: May 01, 2020, 03:21:29 am »
Hey samco, this looks great.

Do the 4 leds help keep the system accurate if you change position relative to the screen like side to side or stand up etc?

Doing that would require you to recalibrate the aimtrak for example.
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #92 on: May 01, 2020, 07:10:56 pm »
Hi Lightgungamer,

Yeah, currently definitely works better if you play from the position you calibrated so similar to Aimtrak. But I have an idea of how to add perspective correction that I'll start working on next week which could fix that. I'll let ya know how I go.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #93 on: May 24, 2020, 01:54:31 am »
Hi Guys,

Just ironed out a few bugs in my 4 LED code and updated my GitHub. If anyone wants to try it out and let me know what they think Iíd appreciate it.

Cheers Sam(co)

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #94 on: June 18, 2020, 01:32:31 am »
Hey Guys, just uploaded my GunCon2 vid...


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #95 on: June 18, 2020, 01:43:44 pm »
So do we have a running total for the parts list now?  Been thinking of building one since the sinden gun keeps getting delayed. 

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #96 on: June 18, 2020, 09:48:25 pm »
Hi Howard,

GunCon2's vary quite a bit but lets say $40US for the sake of argument. DF Robot IR Positioning Cameras are $23.55US + postage on there website, the cheapest ItsyBitsy you can get is $9.95US + postage and my PCB's are $10US + $3US postage. You might be able to save a little on potage by getting the Camera & ItsyBitsy board from a maker website so a safe estimate would be a little under $90US (+ postage) it you had to buy all the parts. Obviously you can save quite bit if you have an old GunCon2 floating around or can find one cheap :)

https://www.dfrobot.com/product-1088
https://www.adafruit.com/product/3677
https://www.ebay.com/itm/184265539060

Cheers Sam(co)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18758
  • Last login:Today at 11:48:47 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #97 on: June 19, 2020, 03:14:04 am »
Thanks for the reply.  I was actually thinking of making a custom 3d printed enclosure.  I'm not sure though.... that might not be worth the effort. 

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #98 on: June 20, 2020, 08:02:30 pm »
Yeah, that would be cool! But a lot of work :) If you're building your own Gun then you wouldn't need a PCB and could use any 32u4 board you like so the only so the only real cost would be the IR positioning camera. So be quite a bit cheaper but a lot more work. Cool idea though I'd love to know how ya go.

LightFun

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 27, 2020, 08:12:47 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #99 on: June 21, 2020, 09:13:34 am »
Hey Guys, just uploaded my GunCon2 vid...


Noticed this pop up on my YouTube feed a few days ago. I look forward to watching, your first video was great.

hyo2012

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:September 18, 2020, 01:14:34 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #100 on: June 28, 2020, 05:05:07 am »
I succeeded in make Samco 4IR light gun.
Strange thing is I have to rotate IR Camera about 90 degree to work correctly.
And works properly, that was amazing.
Compared to Aimtrak lightgun I used, Samco 4IR light gun's working distance that monitor from light gun is decreased. So playing gun game is more fun :laugh:

I have a suggestion.
When I use light gun, other mouse is not movable. To use mouse, I have to push calibration button on light gun.
It is better I think, if light gun can't see IR light, stop working with out pushing calibration button.
And.. Is it possible add fuction 'offscreen trigger reload'?

Thank for your works. I ordered 3unit of guncon2 pcb from your ebay ;D
« Last Edit: June 28, 2020, 05:13:41 am by hyo2012 »

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #101 on: June 30, 2020, 10:37:07 pm »
Thanks, for the feedback @hyo2012. I'm glad you like it :)

Yeah, apparently a bunch of the DF Robot camera had the labels stuck on the incorrectly it's a real common problem. Glad you worked it out.

I'm a bit busy with other stuff at the moment but I'll have a look into your suggestions when I get some spare time and let ya know how I go. Out of curiosity which game are you playing that you would like to add the offscreen trigger reload?

Cheers Sam(co)

hyo2012

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 54
  • Last login:September 18, 2020, 01:14:34 am
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #102 on: July 01, 2020, 02:11:17 am »
Thanks, for the feedback @hyo2012. I'm glad you like it :)

Yeah, apparently a bunch of the DF Robot camera had the labels stuck on the incorrectly it's a real common problem. Glad you worked it out.

I'm a bit busy with other stuff at the moment but I'll have a look into your suggestions when I get some spare time and let ya know how I go. Out of curiosity which game are you playing that you would like to add the offscreen trigger reload?

Cheers Sam(co)

most of demul lightgun games - hotd 2, confidential mission, maze of kings... 

As I know, these sega arcade gun games are support offscreen reload on original arcade cabinet.

judokan

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:Today at 04:45:38 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #103 on: September 04, 2020, 10:21:28 am »
Hello, Iīm from spain (murcia), I have bought 2 motherboards from ebay, I already have everything else, I have assembled it to test it and it does not work with the Adafruit ItsyBitsy 32u4 5v the pins is different for 5v.
« Last Edit: September 05, 2020, 07:52:19 am by judokan »

judokan

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:Today at 04:45:38 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #104 on: September 10, 2020, 05:22:14 pm »
Arduino:1.8.13 (Windows 7), Tarjeta:"Adafruit ItsyBitsy 32u4 5V 16MHz"

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::AbsMouse_()'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::AbsMouse_()'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::init(unsigned int, unsigned int, bool)'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::report()'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::move(unsigned int, unsigned int)'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::press(unsigned char)'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse_::release(unsigned char)'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\AbsMouse.cpp.o (symbol from plugin): In function `AbsMouse_::AbsMouse_()':

(.text+0x0): multiple definition of `AbsMouse'

libraries\Samco_2IR\AbsMouse.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::DFRobotIRPosition()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::DFRobotIRPosition()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::~DFRobotIRPosition()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

Se encontraron varias bibliotecas para "Wire.h"

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

Usado: C:\Users\usuario\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.13\libraries\Wire

 No usado: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

(.text+0x0): multiple definition of `DFRobotIRPosition::~DFRobotIRPosition()'

Se encontraron varias bibliotecas para "AbsMouse.h"

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

Usado: C:\Program Files (x86)\Arduino\libraries\Samco_2IR

 No usado: C:\Program Files (x86)\Arduino\libraries\Samco_4IR

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::requestPosition()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::readX(int)'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::readY(int)'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::writeTwoIICByte(unsigned char, unsigned char)'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::begin()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\Samco_4IR\DFRobotIRPosition.cpp.o (symbol from plugin): In function `DFRobotIRPosition::DFRobotIRPosition()':

(.text+0x0): multiple definition of `DFRobotIRPosition::available()'

libraries\Samco_2IR\DFRobotIRPosition.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compilando para la tarjeta Adafruit ItsyBitsy 32u4 5V 16MHz.



Este informe podrŪa contener mŠs informaciůn con
"Mostrar salida detallada durante la compilaciůn"
opciůn habilitada en Archivo -> Preferencias.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #105 on: September 10, 2020, 06:20:45 pm »
Hi judokan, this might be caused by having an extra library in your libraries folder. Try and remove the AbMouse library and DFRobot Library if you have it as a stand alone libraries and only put one of the Samco libraries (either Samco_2IR or Samco_4IR) in your libraries folder.

Cheers Sam(co)

tomton

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:Today at 05:16:54 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #106 on: September 23, 2020, 04:23:23 am »
Hi Samco,

This project is great! As soon as I saw it I started sourcing all the elements and finally was able to put it all together last night.
Uploaded your sketch successfully and new HID device appeared in the Device Manager (windows) but I don't see any output in the serial monitor window.

I have tried reuploading your sketch, restarting my PC and a few other things but no luck.

I have attached screenshot showing what I see after uploading your code.

Have you got any idea what could it be?


Thanks in advance,
Tom

kim_sama_999

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:Today at 02:00:32 am
  • Time Crisis Gamer
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #107 on: September 23, 2020, 07:41:47 am »
Awesome work  8) !!! I bought the pieces and the PCB to try out. I really like the 2 sensor bar option which makes the gun work better. If I have good luck with making it I would buy the new pieces and PCB and put it in a Namco arcade gun shell  ;D

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:Yesterday at 07:55:51 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #108 on: Yesterday at 07:55:51 pm »
Hi tomton, sorry for the late reply. Sometimes with the ItsyBitsy the Com Port can change when you upload a sketch so you could try changing your COM port before running the serial monitor. Opening the serial monitor is mainly just to check the sketch is running properly so alternatively you could just try and calibrate with it closed. Hope this helps let me know how ya go.

tomton

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:Today at 05:16:54 pm
  • I want to build my own arcade controls!
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #109 on: Today at 05:17:39 pm »
Hi Samco,

Thanks for your reply.

I have spent more time with this today and tried to upload your sketch to Arduino nano and this produced loads of errors saying "error: 'AbsMouse' was not declared in this scope"
Weirdly I don't get those errors when uploading to ItsyBitsy  :dunno . I have tried redownloading AbsMouse but still getting those errors.

I have tried doing this on another PC but still no luck...   :banghead:

Any idea?