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

Logitech G2x shifter interfacing with MegaJoy #35

Open
MineAngerBR opened this issue Jul 7, 2020 · 6 comments
Open

Logitech G2x shifter interfacing with MegaJoy #35

MineAngerBR opened this issue Jul 7, 2020 · 6 comments

Comments

@MineAngerBR
Copy link

Hello, i'm trying to interface analog-based H-shifters, just like the common and available shifters from Logitech for the G series (G25, G27, and Logitech Driving Force Shifter for the G29/G920)
I'm not a programmer in any means or stretch, just one enthusiast wanting to build something more integrated, so i don't need to have multiple boards for each part of the simulation mechanisms.
With some code from the youtuber AMStudio, i got the basics of the interface (it actually works, changing the position of the analog axis activates the button), but it lags a lot (from 1,5 up to 5 seconds between shifts), while the other buttons work just as fast as they always worked, i would like to know how can i optimize it to shift faster

the file is for MegaJoy:
MegaJoyArduinoG2xShifter.txt

@AlanChatham
Copy link
Owner

AlanChatham commented Jul 8, 2020 via email

@MineAngerBR
Copy link
Author

Hey Alan, thanks for answering me.

Yeah, i made a small sketch to test my analog reads and also to output as the gear selected, and they're being quick and responsive. And about the pullup resistors, i've removed that bit of code from the original sketch to test and the responses are still slow.

@AlanChatham
Copy link
Owner

AlanChatham commented Jul 8, 2020 via email

@MineAngerBR
Copy link
Author

I removed the delay() to test, still no difference.
The problem in MegaJoy isn't flickering, is the response time between moving the position in the XY axis, and the arduino "pressing" the correct button.
All the buttons are okay and responding quickly, even the digital pins 3-8 when i pull them to GND with a jumper.
Just the "XY-to-button" conversion is problematic.

@AlanChatham
Copy link
Owner

AlanChatham commented Jul 8, 2020 via email

@MineAngerBR
Copy link
Author

Alright, i tried to optimize it messing with the "if-else" statements, but no change in the speed of the responses from the "XY-to-button" conversion, and the standard way (digital pin and ground) is still ok and working as quick as always

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