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 4121 times)

0 Members and 1 Guest are viewing this topic.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 17759
  • Last login:Today at 09:15:25 pm
  • 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: 69
  • Last login:Today at 04:33:05 pm
  • 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: 18
  • Last login:Yesterday at 10:47:09 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: 69
  • Last login:Today at 04:33:05 pm
  • 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: 18
  • Last login:Yesterday at 10:47:09 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: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 223
  • Last login:October 19, 2019, 09:23:44 am
  • Brilliant!
    • 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:September 12, 2019, 06:29:52 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: 18
  • Last login:Yesterday at 10:47:09 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: 62
  • Last login:October 18, 2019, 04:28:13 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: 18
  • Last login:Yesterday at 10:47:09 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: 62
  • Last login:October 18, 2019, 04:28:13 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: 27
  • Last login:Today at 02:19:48 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

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 27
  • Last login:Today at 02:19:48 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

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 27
  • Last login:Today at 02:19:48 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

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 128
  • Last login:September 29, 2019, 07:26:29 am
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: 17759
  • Last login:Today at 09:15:25 pm
  • 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: 128
  • Last login:September 29, 2019, 07:26:29 am
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: 27
  • Last login:Today at 02:19:48 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

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 128
  • Last login:September 29, 2019, 07:26:29 am
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: 27
  • Last login:Today at 02:19:48 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

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17759
  • Last login:Today at 09:15:25 pm
  • 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: 27
  • Last login:Today at 02:19:48 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

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 27
  • Last login:Today at 02:19:48 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

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:Yesterday at 10:47:09 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: 18
  • Last login:Yesterday at 10:47:09 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: 39
  • Last login:Today at 12:32:54 pm
  • I want to build my own arcade controls!
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: 128
  • Last login:September 29, 2019, 07:26:29 am
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: 17759
  • Last login:Today at 09:15:25 pm
  • 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: 39
  • Last login:Today at 12:32:54 pm
  • I want to build my own arcade controls!
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: 18
  • Last login:Yesterday at 10:47:09 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: 39
  • Last login:Today at 12:32:54 pm
  • I want to build my own arcade controls!
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: 17759
  • Last login:Today at 09:15:25 pm
  • 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: 39
  • Last login:Today at 12:32:54 pm
  • I want to build my own arcade controls!
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: 39
  • Last login:Today at 12:32:54 pm
  • I want to build my own arcade controls!
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: 17759
  • Last login:Today at 09:15:25 pm
  • 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.