Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding trigger buttons #65

Open
HOMECODERNEO opened this issue Sep 6, 2024 · 5 comments
Open

Adding trigger buttons #65

HOMECODERNEO opened this issue Sep 6, 2024 · 5 comments

Comments

@HOMECODERNEO
Copy link

HOMECODERNEO commented Sep 6, 2024

While building and testing the device, I had an idea to offer you to add to the firmware and GUI of the program the possibility to configure some buttons as triggers (provided that toggle switches instead of buttons will take their place in the “matrix”). So that at on-off and off-on events there would be a short pulse of 200-300ms duration, simulating a button press, and the toggle switch would just change its position, not remaining clamped by the button, as it is now. I don't know if I managed to describe the essence of the idea (I apologize, as I translated it through a translator) and how adequate this idea sounds in relation to your project.

@ranenbg
Copy link
Owner

ranenbg commented Sep 6, 2024

Hi, why not just use a normal togle switch and connect it to two buttons, or just one if you wish?

@HOMECODERNEO
Copy link
Author

For example, in the same ETS2 if I use the turn signal switch from the car in my homemade system, it turns out that to turn on and off the turn signals I have to move the lever twice, it does not look realistic. After all, this switch has a fixed position, not pressed. This is a basic example, and there are several other situations like this.

@HOMECODERNEO
Copy link
Author

This is a pretty specific case, and worth considering as an idea for improvement if it has the right to exist in the project.

@ranenbg
Copy link
Owner

ranenbg commented Sep 7, 2024

It's a good idea, I agree. On the coding side of things it's not simple at all to implement it, as I would need to use timers and quite some memory space for it. Also, I don't want to implement a feature in firmware that will be usable only in ets2.

I read your first post a few times and I'm not sure that I understand exactly how you want these special buttons to operate. I'd appreciate if you explain again in more details, with an example of function in the game that you want to simulate and how the firmware should handle that. How does ets2 handle buttons for activating steering indicator lights? Some pictures, or wiring schemes for your system with buttons/switches would be helpful as well.

To me it seems that what you want can be easily done by using correct hardware. There are many types of switches, like the ones with 2 poles, 3 positions that always go back to center position.

@ranenbg
Copy link
Owner

ranenbg commented Sep 9, 2024

It may be possible to implement such a feature on some buttons that are directly on arduino, but definitely not in the button matrix. It uses a special algorithm to scan all rows and columns to find which buttons are pressed, there can't be any timers there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants