Main > Lightguns

IR-GUN4ALL - Enhanced Arduino-powered DIY 4-Point IR Lightgun System

<< < (5/10) > >>

Hey all! Seong here. Happy holidays for those who celebrate, or happy belated Monday to those that didn't.

I'll be getting my hands on another camera and a few more Pico boards soon, so I'll be able to start on implementing some of the features I promised earlier; like the support for analog sticks, but I'll also be working on outputting as a gamepad for the likes of PCSX2 or some Steam games that treat a stick as another absolute pointing device, more serial codes for configuring the gun in lieu of pause mode (for guns with too few buttons or for future use), and adding on the ability for buttons to serve different functions when on/off screen (distinct from the off-screen reload button, which is already there).

That being said, I did open up a discussion post on the repo recently about future plans after these features are added. At some point in 2024, I'd like to try pivoting away from purely in-sketch configuration and the hard-coded defines that are in use currently to dynamically changing the user adjustable aspects like button and pins mapping (and the other options) to make a graphical user interface more feasible. Part of this would necessitate moving as much as is possible to EEPROM/Flash and refactoring the save functionality a bit to accommodate for this, but also for making a simpler flashing/configuration utility--preferably with cross-platform support for Windows & Linux at minimum.
At the very least, I know much of the setup can be automated using the Arduino CLI (and/or the ability to push and communicate with the board through serial), though it could also be nice to be able to distribute raw binaries that can be simply drag'n'dropped onto a board. I'm still not quite sure on what the ideal would be for this going forward, in an effort to reduce friction as much as possible for the end user--and also not being a UI designer nor having ever written a desktop app myself. (^^;

If anyone has input to offer about this, please do share! But in the meantime, expect some updates in the coming weeks.

Happy New Year, everyone!  :cheers:

Apparently 'coming weeks' came early, as I've spent the better part of a day pushing in support for Gamepad output, extra debugging/control commands, on-the-fly control mapping (so you can now send a signal and the Start/Select buttons will reflect the player slot!) and real off-screen button support for low-button gun shells to the repo (and also fixes for Picos so they should 'just werk' - camera goes to GP4&5/physical pins 6&7, I need to add this to the manual).
As far as I know, this is probably the only open-source gun system with full support for multiplayer on PCSX2 nightly and others? But it's something I was excited to include and I hope everyone can try it out and see how it goes. There is no formal update released yet, but it should be working fine--if anyone wants to test these out and provide feedback, please do!

Anyways, I'll be getting my hands on a Top Shot soon so I can provide analog stick input support of some kind - it'll likely either be duplicated to the keyboard arrows, or the gamepad's POV hat/d-pad. Other than that, I'll be pulling in some form of external RGB support--once these are all done and the baseline features are in a good state, I can start working on the save system to hopefully make things more portable and/or easier in the future!

Happy Saturday!

I've finally implemented the things I'd said I would for a bit now--analog stick and full-fledged RGB support is now in! It required me faffing about with the HID device descriptor, which... never again, it's a royal PITA. But it will now expose both left and right analog sticks and a full lot of 15 buttons to use.
Shortly after, I got a helpful tip to add the ability to switch what stick the gun camera reports as when in analog output mode, so I've just finished that too! Sending `XAL` or `XAR` over serial to the device will set the camera to either be the left or right stick of the gamepad device, and the one leftover is reserved for the gun's physical analog stick.
As for RGB, it supports both types of fourpin units: common Anode (+/5V) and common Cathode (-/GND), and the code will invert RGB commands as appropriate. I've also exposed the option to have an external NeoPixel as an addressable LED--either a single unit or a user-definable strip of them if you happen to have them/daisy chain units together.

You can help test all this out by downloading the source directly, as I need some people to help confirm that the analog stick is in fact working as it should! Once I've confirmed it's all working, it'll go up as a proper release - which I hope to be the very first binary releases, meaning anyone with the Pico or a matching board can just download the UF2, stick it on the microcontroller and get going with predefined pins--no dev tools necessary! I'll still have a backdoor method for advanced users to load and save their own custom pin definitions (and as always, the source remains available for those who want fully custom deployments). :)

Sorry for the terseness of this update, as it's hella late for me now, but save support is being expanded on a separate branch.

Once this is done (and when I actually get around to updating documentation and making some Pico-appropriate pinout diagrams), I can confidently lean on the binary releases full time - since this means you won't need the full IDE or any development environment to configure the gun's features after flashing the firmware. It's a much bigger release than I'd anticipated, but since I have the time to work on things now I may as well go the full distance, right?

It does look a bit ugly if you look at it close enough, but it's worked well so far in my testing tonight!

v3.0 is finally here.
The release notes are far too long to get into, so click the link to see it for yourself. But the cliffnotes are:
* First binary releases, so you can just plop the firmware on a board and flash it without any dev environment or compilation needed.
* Full save support, making pins configuration and other settings fully customizable on the board without a reflash (except for the minutia of button mapping, but it should be good for most situations anyways).
* Offscreen buttons functionality and general improvements for lower button gun setups, i.e. vanilla GunCon 1's or Saturn Stunners.
* Analog output (gun coords as joystick) and physical analog sticks supported.
* External RGB LEDs support, both 4-pin devices with common cathode/anode or NeoPixels.
* Pico is the default for realsies, documentation has been updated to reflect it (ItsyBitsy is still largely the same as before).
* Plumbing in places and other misc fixes.
Aside from whatever fixes that might be needed as people report them, I'm pretty happy with how things have come out!
Since we provide binaries for simple installation now, I'll be looking into smoothing over the actual configuration process via GUI - though the information is already there in the wiki for those who have access to a serial terminal.

I guess I should probably work on an update demo video soon too, aha.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version