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

0 Members and 1 Guest are viewing this topic.

samco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • Last login:December 12, 2022, 06:21:30 pm
  • SAMCO Light Gun Creater
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #160 on: December 12, 2022, 06:21:30 pm »
@scratcher no problem mate. The easiest way is to just reallocate those pins. So find the bit in the code that looks like this and swap the values around like this...

int _tiggerPin = 7;               // Label Pin to buttons
int _upPin = 11;               
int _downPin = 13;             
int _leftPin = 10;             
int _rightPin = 12;               
int _APin = A1;               
int _BPin = A0;             
int _startPin = A2;
int _selectPin = A3;               
int _reloadPin = 9;
int _pedalPin = 5;   

That will swap those function around. i.e down is now calibration and the old calibration button is now down.

ThatOneSeong

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:April 18, 2023, 08:02:06 pm
  • Just your average Seong.
    • Twitter
Re: SAMCO DIY Arduino Powered IR Light Gun
« Reply #161 on: April 02, 2023, 02:21:48 pm »
Long time no see, everyone!
Weird to think this has been going for two/three years, but I'm still maining Prow's fork with no issues* on Linux. FWIW, I've made a small modification to allow setting the gun to pause mode with a key combination so I can use C as Mouse Thumb 1/Mouse4, what with the recent merging of PCSX2 GunCon2 support for all platforms.
In case anyone's interested in following along, to change Pause mode to a combination of C + Select, change line 178/179 to:
Code: [Select]
// button combo to enter pause mode
constexpr uint32_t EnterPauseModeBtnMask = BtnMask_Reload | BtnMask_Select;
I'd make a pull request but I wasn't sure how many people would want to change this behavior.

*Actually there is a problem, but not from the gun or the software itself. I'm starting to realize that the cheap sensor bars I've been buying have a bad habit of dimming over time. Because of this, I've been tempted to buy RPEG's high-power black LEDs used for GUN4IR, and just arranging them in the same orientation as a top/bottom Wii lightbar, but maybe this is a bit extreme? I've tried looking into other Wii USB lightbars, but they all look exactly the same; having three leds on either side instead of five, and a tendency to dim over a period of time. I've also looked into the wireless options like the Power A Ultrabar, but not only would I be wasting batteries but getting a pair would be about as expensive as buying the kit from RPEG. And buying bulk lots of the cheap bars seems even more wasteful (not to mention a hassle of switching them out every so often). I could perhaps take some legit OEM Wii sensor bars and mangle them to work off USB/another non-Wii centric power source, but that seems messy. Are some knockoff Wii sensor bar brands better than others, maybe?
I'm just not sure. Has anyone else ran into this issue? Mayhaps some of the Lichtknarre 2LED users can chime in here? I'm just trying to figure the best way of doing this, as I do plan on making potential videos about PC Light Guns and will probably highlight Samco in the process (mayhaps alongside Gun4IR? Not sure), so I'd like to know what exactly to recommend/what the common consensus is for my own research.