Solved GPIO with RPi 1 (26 PIN GPIO)
-
Hi there,
I cannot configure my (BarTop) Joystick.
see: https://github.com/recalbox/mk_arcade_joystick_rpi/blob/hotkeybtn/README.md#pinoutAnd here is, what I tried in my .conf file.
(of course I also tried standard config)------------ D2 - GPIO Controllers ------------
GPIO Controllers
enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)
controllers.gpio.enabled=1
mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)
controllers.gpio.args=map=5
Custom mk_gpio arguments,
map=5 gpio1=Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl,hk for one controller,
map=5 gpio1=pin11,pin7,pin13,pin15,pin19,pin21,pin22,pin18,pin16,pin12,pin-1,pin-1,pin3map=5,6 gpio1=Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl,hk gpio2=Y-,Y+,X-,X+,start,select,a,b,tr,y,x,tl,hk for 2 (map=5,map=5,6)
map=5,6 gpio1=gpiox,gpioy,gpioz,.....,gpiou,gpiov gpio2=gpiox,gpioy,gpioz,.....,gpiou,gpiov
where gpiox,gpioy,gpioz ... are NOT pin numbers on the connector, BUT location gpio numbered as in
https://www.raspberrypi-spy.co.uk/wp-content/uploads/2012/06/Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png
Set pin to -1 to disable it
controllers.gpio.args=map=5 gpio=11,7,13,15,19,21,22,18,16,12,-1,-1,3
MCP configuration : GPIO and MCP can be used together. You can mix them.
map=0x20,0x21 for 2 mcp23017 on i2c bus
#controllers.gpio.args=map=0x20,0x21,5,6 gpio=4,17,27,22,10,9,25,24,23,18,15,14,-1 gpio2=11,5,6,13,19,26,21,20,16,12,7,8,-1
It just doesn't work at all.
Any ideas?
Thank you!
Christian -
@Raketenmann You need to check with a ssh connection and linux commands that le mk_arcade module il well loaded. After, use evtest to test each button and joystick direction. Which rela**e of rpi1 do you have ? 512B b+ ?
-
Hi IAN57,
thanks for the quick answer.
The module is loaded - it seams to me:
Module Size Used by Tainted: G
mk_arcade_joystick_rpi 4442 0And here is the output from the evtest:
Input driver version is 1.0.1
Input device ID: bus 0x15 vendor 0x1 product 0x1 version 0x100
Input device name: "GPIO Controller 1"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_SOUTH)
Event code 305 (BTN_EAST)
Event code 307 (BTN_NORTH)
Event code 308 (BTN_WEST)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min -1
Max 1
Event code 1 (ABS_Y)
Value 0
Min -1
Max 1But no reaction on any input.
RPi Version: Pi Model B Rev 2
(thats the output from cat /sys/firmware/devicetree/base/model)Thanks!
CHristian -
@Raketenmann which release of RB are you running because with 6.0 I made a mistake in the mk_arcade module preventing pi0 ans pi1 to work with gpio see here https://github.com/recalbox/mk_arcade_joystick_rpi/issues/71. Please try the last beta 3 or 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 -
Hi Ian,
it might be a stupid question. But how to copy the file?cp: can't create '/lib/modules/4.14.62/extra/mk_arcade_joystick_rpi.ko': File exists
Sure. But if I try to delete it - even with root / su
rm: can't remove 'mk_arcade_joystick_rpi.ko': Read-only file system
BTW - Recalbox UI shows there is an update available if I switch to "BETA". But the download fails.
Thank you!
Christian -
@raketenmann
mount -o remount,rw /
-
Thank you Gentlemen!
Works now.
Not perfect. But I received a first feedback while configure controls. Rest will be easy and fixed in the config file later today.You may close this!
Great support.
Thanks!
Christian -
@raketenmann Do not try to update :), It would downgrade to 6.0 I think
-
Thx!
First I tried to update. Did not worked.
Thats why I changed the File by using the shared folder and SSH.Now- as it works - I will keep it until the next official release where you hopefully take care on RPi 1 users.
Again: great support.
Thx
CHristian -
@raketenmann I hope to :), but Pi0 is very close to Pi1 of first gen... so it shoulb be