[Solved] Very glitchy controls.

Having trouble with your GBZ build? Ask your questions here!
DeRock89
Posts: 94
Joined: Wed Sep 06, 2017 6:25 pm
Been thanked: 9 times

[Solved] Very glitchy controls.

Post by DeRock89 » Tue Oct 03, 2017 6:57 am

Hey,

I just finished my first build. The controls aren't working exactly right. I am using Leoranrdo microcontroller and a simple button PCB. It is wired exactly like SOTAs build. I used sotas guide for programming the leornaedo.

When a button is pushed one time, it's like the button was pushed really quickly twice. When scrolling through things, it skips every other thing as if it was pushed twice. when I select an emulator, it goes straight into a game and skips the list of roms most times. It's difficult to shut down because it skips the shutdown options And goes straight to restarting emulation station.

Also with the start and select buttons, I have to jam my nails way deep into the shell to push the those buttons in as far as I can to make them work. The button PCB is tight against the frame and screwed in well.

Also, my analog right/left is inverted with N64 games. Do I need to swap the wires for them, change the micro controller sketch, or the Retropie settings to fix that?

User avatar
YaYa
Posts: 1719
Joined: Mon Jun 26, 2017 12:42 pm
Location: brittany - France
Has thanked: 871 times
Been thanked: 688 times
Contact:

Re: Very glitchy controls.

Post by YaYa » Wed Oct 04, 2017 2:20 pm

Any pictures of the thing ?
Follow me on instagram Image

DeRock89
Posts: 94
Joined: Wed Sep 06, 2017 6:25 pm
Been thanked: 9 times

Re: Very glitchy controls.

Post by DeRock89 » Thu Oct 05, 2017 5:31 am

YaYa wrote:
Wed Oct 04, 2017 2:20 pm
Any pictures of the thing ?
Here ya go

Image


Image


Image

Kenshin16
Posts: 29
Joined: Thu Aug 17, 2017 4:21 am
Has thanked: 10 times
Been thanked: 7 times

Re: Very glitchy controls.

Post by Kenshin16 » Thu Oct 05, 2017 8:07 am

When you downloaded the sketch to the pro micro did you put it as the spark fun or the Leonardo for the device? I figured out that board has to be put as the Leonardo for mine to work. Mine works great with 2 joysticks and 14 buttons. No problem. Although I used the common button pcb from kitsch-bent

Fixmylife
Posts: 28
Joined: Tue May 02, 2017 11:43 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Very glitchy controls.

Post by Fixmylife » Thu Oct 05, 2017 8:34 am

Im actually having this same issue .. i think it started after i put the two analog sticks i tryed using different wire and still the same issue .. while in games the buttons work great .. while im in emulation station looking through the menu they are crazy and skip or double click

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2977
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1457 times
Been thanked: 3111 times

Re: Very glitchy controls.

Post by Helder » Thu Oct 05, 2017 10:58 pm

It's the code in the sketch, try changing the debounce values to something higher.
Chat with me and other members On Discord

Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.


Helder's Game Tech Website

We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.

Fixmylife
Posts: 28
Joined: Tue May 02, 2017 11:43 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Very glitchy controls.

Post by Fixmylife » Sun Oct 08, 2017 12:09 am

Where can we find the debounce values in the sketch

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2977
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1457 times
Been thanked: 3111 times

Re: Very glitchy controls.

Post by Helder » Sun Oct 08, 2017 9:17 am

Honestly looking at the sketch I can't find it easily or it doesn't stand out. Maybe someone with more Arduino coding experience will chime in and help.
Chat with me and other members On Discord

Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.


Helder's Game Tech Website

We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 36 times

Re: Very glitchy controls.

Post by salami738 » Mon Oct 09, 2017 5:21 am

Hi, i don't saw any debouncing options in the Gamecontroller.ino (downloaded on 2017-10-09 13:00).
I wonder that no one else has the problem, although button bouncing is a common problem.

Long story short: If you press a button, it is no clean rising(0 to 5V) or falling signal (5V to 0), rather the state changes rapidly.
This has to be corrected by hardware or by software. Software is the easier way in this case.
You have to catch the first signal, then ignore all signals for a short amount of time (debounce values).

You need to patch the sources yourself.
Example: https://www.arduino.cc/en/Tutorial/Debounce

salami738
Posts: 128
Joined: Sat Sep 09, 2017 6:06 am
Location: Germany
Has thanked: 60 times
Been thanked: 36 times

Re: Very glitchy controls.

Post by salami738 » Mon Oct 09, 2017 11:56 am

Hi,

please add the following line to your code, right after
"
// Send everything to USB
Joystick.setState(&joySt);
"
but before the closing brace.

line:
delay(50);

This will add a delay of 50ms between two keypresses. Please test this, i have no arduino micro to test at the moment.
You can also try out different values between 10 and 100.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest