GPIO Based controller (Not the same question again)
-
I know this has been asked and answered 100 times, so I am not here to ask about how to connect buttons to the GPIO ports. Originally I wanted to hook up 2 analog sticks to the pi through the GPIOs, that was quite easy in fact, not much coding involved, (Only a adc + a few lines) but to make it useful to Recalbox or RetroPie I had to make those as inputs, maybe for now I won't worry about analogs. In fact it did work with the mk_arcade_joystick binary, but it was not really useful without some changes. So my question is, can I change or make a GPIO controller based on the mk_arcade_joystick? I think with some changes I could make the analog inputs x and y readable and exclude for good player 2 and use those GPIOs for player one. Tell me if I am missing anything here... EDIT.: Oh, and where could I find a full list of all the BTN_START, BTN_B, BTN_A, etc?
-
Hi, yes you have to modify the module, and recompile it in the recalbox buildroot crosscompile environment. The list of all inputs is located in http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/input.h?v=2.6.11.8
-
Oh thanks for the handy list code! I'm not as familiar as I'd like to be with Linux, but we are coming along =D. I already started coding and got some neat feedback. Now, one more question, think I can use the I2C defines on my ADC, right? I am currently using ADC 0804, it's what I could get now on my country... It works somehow, so I guess I can use it... Anyway, after I am done coding this and make it work, can I ask to push this into the recalbox distribution?
-
Yes that could be nice. I think you should create a pull request to the mk arcade gpio joystick repository, and i would let users decide what version of the driver they want to use in the recalbox.conf file.