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

recalbox 6.0-DragonBlaze /recalbox 4.1 gpio buttons do not work at zero but work at pi3 #71

Open
DRAgon734465502 opened this issue May 21, 2019 · 30 comments

Comments

@DRAgon734465502
Copy link

I have try mk_arcade_joystick_rpi at the newest recalbox 4.1

I active the GPIO buttons by this code

nano /recalbox/share/system/recalbox.conf

controllers.gpio.enabled=1
controllers.gpio.args=map=5 gpio=5,6,16,13,26,19,21,20,14,12,15,23,3

this work at pi3/3B+ but do not work at zero/zero W
anyone have some problem ??

thinks

@ian57
Copy link
Member

ian57 commented May 21, 2019

what are the symptoms ? what does evtest reply? Be careful if you activated sounds on the gpio.. gpio 13 is used for PWN sound output because pizero has no analog output for sound.

Please tell us more .

@DRAgon734465502
Copy link
Author

Yes I use PWM audio out
nano /boot/config.txt
dtoverlay=pwm

I have enabled GPIO LCD and can display OK
LCD code
nano /boot/config.txt
dtparam=spi=on
dtoverlay=pwm
hdmi_force_hotplug=1
hdmi_cvt=480 480 60 1 0 0 0
hdmi_group=2
hdmi_mode=87

nano /etc/modules.conf
flexfb
fbtft_device
nano /etc/modprobe.d/fbtft.conf
options flexfb setaddrwin=0 buswidth=8 width=240 height=240 init=-1,0x11.. -1,0x29,-3
options fbtft_device debug=3 bgr=1 fps=60 custom=1rotate=90 name=flexfb speed=64000000 gpios=reset:27,dc:25,led:24

nano /etc/init.d/rcS
fbcp &

Then GPIO buttons config at recalbox.conf
system.fbcp.enabled=0

controllers.gpio.enabled=1
controllers.gpio.args=map=5 gpio=5,6,16,13,26,19,21,20,14,12,15,23,3

global.videomode=default
global.ratio=1/1

@DRAgon734465502
Copy link
Author

this is all code , which work fine at PI3

But at zero, jsut display and audio work , the GPIO buttons do not work,
press the buttons do not work

@ian57
Copy link
Member

ian57 commented May 21, 2019

First : which release of Recalbox?
second : try to deactivate pwm to see if it is in cause. comment #dtoverlay=pwm in confit.txt

@DRAgon734465502
Copy link
Author

recalbox 6.0-DragonBlaze
uname -a
show linux 4.1

@DRAgon734465502
Copy link
Author

active the GPIO buttons by this code

nano /recalbox/share/system/recalbox.conf
controllers.gpio.enabled=1
controllers.gpio.args=map=5 gpio=5,6,16,13,26,19,21,20,14,12,15,23,3

which will make recalbox starting first desktop

@DRAgon734465502
Copy link
Author

Do not add that code , it is like this picture
http://ae01.alicdn.com/kf/HTB1dlCnXRWD3KVjSZKPq6yp7FXan.jpg

after adding that code , it is like this picture
http://ae01.alicdn.com/kf/HTB1M_KnXSWD3KVjSZSgq6ACxVXab.jpg

@DRAgon734465502
Copy link
Author

I do not why the first starting have been changed from favorites to AMSTRRAD when active the gpio buttons

@ian57
Copy link
Member

ian57 commented May 21, 2019

are the controls working properly ? did you try to deactivate pwm?

@DRAgon734465502
Copy link
Author

I do not active PWM audio output and GPIO LCD and just active GPIO buttons ,
Then I find the first starting have been changed from favorites to AMSTRRAD
After I disable GPIO buttons, the first starting have gone back to favorites

@DRAgon734465502
Copy link
Author

controls all do not work , I have tried to activate pwm or deactivate pwm . same result

I also change two raspberry pi zero , same ..

@DRAgon734465502
Copy link
Author

the PI3 iamge and zero image from here
https://archive.recalbox.com/

PI3 can work fine .
zero will work like that .

which is bug at recalbox for pi0 ???

@ian57
Copy link
Member

ian57 commented May 21, 2019

ok seems to be a bug. need to make some test on my own to confirm.

@DRAgon734465502
Copy link
Author

after I change controllers.gpio.args=map=5 gpio=5,6,16,13,26,19,21,20,14,12,15,23,3
to controllers.gpio.args=map=4 ..

make "5" to "4" the first starting have been changed to this automatically
http://ae01.alicdn.com/kf/HTB1VUqpXQ9E3KVjSZFrq6y0UVXav.jpg

But all gpio controls still do not work

@DRAgon734465502
Copy link
Author

which show "gamepad 1" "input require"
but the app can not check gpio buttons

@ian57
Copy link
Member

ian57 commented May 21, 2019

do not try 4 (GPIO_TFT), custom gpio is 5 and 6 that's all. if gpio a detected you shoud see "custom GPIO"
enum mk_type {
MK_NONE = 0,
MK_ARCADE_GPIO,
MK_ARCADE_GPIO_BPLUS,
MK_ARCADE_MCP23017,
MK_ARCADE_GPIO_TFT,
MK_ARCADE_GPIO_CUSTOM,
MK_ARCADE_GPIO_CUSTOM2,
MK_MAX
};

@DRAgon734465502
Copy link
Author

5 and 6 do not work ,
I have tried
controllers.gpio.args=map=5 gpio=....
controllers.gpio.args=map=5,6 gpio=....
controllers.gpio.args=map=6 gpio=....

controls all do not work

@DRAgon734465502
Copy link
Author

Any news ?

@ian57
Copy link
Member

ian57 commented May 23, 2019

Nope sorry too much work, no time to test.

@DRAgon734465502
Copy link
Author

OK , I will wait your news , Thanks

@Nickrash
Copy link

HI! I have the same problem, and i couldn´t fix it yet...

@DRAgon734465502
Copy link
Author

Yes . I find this problem also

Now I still do not know how to fix this problem

@nsilveri
Copy link

i have the same problem with custom gpio buttons

@ian57
Copy link
Member

ian57 commented Jun 1, 2019

Hi there, the bug is confirmed.... The bug seems to come from my code... I made a mistake in the PERI_BASE address.
I will recompile the module with the corrected code, test it and let you know.
This will be good for 6.1 I hope, Will put the module for downloadinf somewhere for the brave ;)
Thanks a lot for the feeback.

@ian57
Copy link
Member

ian57 commented Jun 2, 2019

Hi there ... good news, correcting the code fixes the bug. For the brave you can DL the new mk_arcade_joystick_rpi.ko at https://mega.nz/#!y9kCEI7I!7HdyKzhWS4HhfVgpvj7SM9RbnLwMUlGXoUqcxzuFCQM
replace the /lib/modules/4.14.62/extra/mk_arcade_joystick_rpi.ko with the new one and enjoy :)

for the others... please wait the 6.1 release..; sorry

@DRAgon734465502
Copy link
Author

good news , thanks

@DRAgon734465502
Copy link
Author

I will test it soon

@Nickrash
Copy link

Nickrash commented Jun 5, 2019

Hi! I already test it, but I have an issue. Now it recognize me a button but an incorrect one. When I push down, it goes up, is the only button that works.
Is my configuration of gpio correct?
I used this one:
image

Regards.

@ian57
Copy link
Member

ian57 commented Jun 5, 2019

I've tested the Map=1,2 successuly on my pi0. I think tout should verify your wiring.

@Nickrash
Copy link

Nickrash commented Jun 5, 2019

I changed the Map=1 to Map=1,2 in recalbox.conf and still not working.

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

4 participants