n-e-y-s / G27_Pedals_and_Shifter

Arduino USB interface for Logitech G27 Pedals and Shifter
67 stars 16 forks source link

Shifter face buttons and reverse gear not working #13

Open ThatMBR42 opened 3 years ago

ThatMBR42 commented 3 years ago

All of the axes are working fine, so all three pedals and the six gears are showing fine, but when I try to use the reverse gear or press any of the face buttons, they don't register in the calibration tool, Windows game controllers, Joystick Gremlin, etc. I tried switching TX0 and RX1 as referenced in #12, but there was no change in behavior. I verified there were no shorts and that all pins on the DB9 connectors had good continuity with their respective pins on the Arduino, both before switching TX0 and RX1 and after.

Board is a KEYESTUDIO Pro Micro, ATMega32U4. Should I install the Sparkfun library anyway? Should I try another board? Or is this probably an issue with my shifter?

RocketBenny commented 2 years ago

Hey @ThatMBR42 did you figure this out? I'm in the exact same position. Same pro micro, installed Sparkfun pro micro board. Tried swapping TX0 & RX1 wand still nothing. I've confirmed that my shifter works as I still have my g27 wheel.

Any advice would be appreciated.

ThatMBR42 commented 2 years ago

Still haven't figured it out, sorry.

RocketBenny commented 2 years ago

Here's an update on how I got mine working. Before I start, I want to mention that I am new to electronics and coding.

TLDR: Check the connectivity between PCB pinouts and microcontroller pinouts. Switch wire from dead port to another and modify the pin definitions. (Also works if TX0 & RX1 are swapped, no need to rewire)

After building it exactly to the instructions and 5 days of scratching my head. My friend (who designs mechanical keyboards) suggested that I used a multimeter to check the connectivity between the ports and the actual pinout on the atmega32u4 microcontroller (the main chip for us tech dummies). I did so and found out that there was no connection between RX1 port and the microcontroller.

(Google: atmega32u4 datasheet)

I asked him if I could use another port, he looked at the code and said, "Yes, they are not using TX0 and RX1 in serial mode".

I swapped my wire from Pinout 0 to 2 and then updated the pin definitions (lines 60 to 64) and all the buttons started working.

I hope this helps someone because as frustrating as this has been for me, it's very rewarding to learn and figure it out.

brunoventura22 commented 2 years ago

[EDIT 3] - SOLVED

RED LED PIN WAS SET TO 3, JUST LIKE DB9 PIN 2..................... I'm so fucking dumb.

Changed red led pin to 7, now everything works. (I'm not using pedals).

[start] I have this exact same problem, but even changing lines 60 - 64 did not work for me ;-; My board has fried pins 0 and 1, so I plugged DB9 1 and 2 into Arduino 2 and 3. Changed pin definitions = nothing. Help? What can I show you guys that may help?

I have also checked every pin on board for short circuits and checked every connection between DB9 and Arduino, and they are properly working.

[edit1] Oh. I didn't check connections to the microcontroller. Will do it now.

[edit 2] Just checked at https://pdf1.alldatasheet.com/datasheet-pdf/view/392234/ATMEL/ATMEGA32U4-MU.html. my board has TX0, RX1, GND, GND, 2, 3, etc. TX and RX are fried. 2 and 3 are pins 19 and 18 (in this order) on the microprocessor. Both are ok with my multitest.

Gears 1 - 6 working properly. No buttons.

PepinoGz commented 2 years ago

Can someone let me know how to fix it? I have the same problem, sparkfun pro micro clone. No reverse or buttons working, i dont know what do i need to change in pin definitions.

brunoventura22 commented 2 years ago

Man, I started to look at my pins and read the code to understand what every pin should do. I was kind of hard at first because I know nothing about code, but I started to figure what everything meant. At the end, I got it working just changing the code a little. Can't remember what exactly.


De: Pepino @.> Enviado: sábado, 23 de abril de 2022 18:40 Para: n-e-y-s/G27_Pedals_and_Shifter @.> Cc: brunoventura22 @.>; Comment @.> Assunto: Re: [n-e-y-s/G27_Pedals_and_Shifter] Shifter face buttons and reverse gear not working (#13)

Can someone let me know how to fix it? I have the same problem, sparkfun pro micro clone. No reverse or buttons working, i dont know what i need to change in pin definitions.

— Reply to this email directly, view it on GitHubhttps://github.com/n-e-y-s/G27_Pedals_and_Shifter/issues/13#issuecomment-1107653533, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGHVFMLHRKHFK43X5CDXI3VGRU5LANCNFSM5CTM3XOA. You are receiving this because you commented.Message ID: @.***>

Borjec1 commented 2 years ago

Can you give fixed code?

brunoventura22 commented 2 years ago

Can you give fixed code?

Unfortunately, my code won't work with your board because I broke some connections and had to use different pins, so my code won't work with your board without some changes.

You will still need to read it and change it.

I can't give it to you now because I don't have access to my main PC. Ask again during the weekend.