Sup /diy/
My bro's birthday is coming up next month and I'm making him a handheld emulator for NES, Gameboy, etc., and I'm doing it with a Raspberry pi. The most interesting part is going to be the controls, for which I have bought an arduino pro mini. Ideally, I would like it to have 11 buttons on it (A, B, X, Y, L, R, up, down, left, right) and also a joystick. The arduino can handle all of those inputs, however my problem is that it doesn't have enough empty headers to use on the GPIO on the Raspberry pi (nor does the RPi contain enough empty GPIO pins for all those buttons). I was thinking of using only 1 digital output on the Arduino and sending a few bytes at a time containing all of the button states to the Raspberry Pi for it to know if a button is pressed or not. I guess my question is can I even do this? Is there a better way to do it?
tl;dr can I use an Arduino board using only digital out to be a controller for an emulator?
>>942226
Whoops, said 11 buttons and mentioned 10. It should probably have a start button too. I can answer any questions if they would help. Thanks in advance anons
That's the way to do it.
Parallel load the button states then "shift" them out in serial.
If you use 2 8bit shift registers hook 'em in series.
Use a second pin for the register clock.
Another pin for load/shift select
I2c, usart or spi can solve the problem, no need to bit bang a serial bus.
Are you going to use an rpi zero? Or the normal model? What kind of lcd are you thinking on?
Sounds like a lot of work for a bro, either your actual brother or you're a homo. I don't even give my friends gifts
>>942252
It's the Pi 2 model b
>>942252
Oh and I have a 3.5 inch PiTFT display for it
>>942254
Yes he's my actual brother. I'm doing it mostly for my own pleasure, but I doubt I'll play a lot of games on it anyway, so I'll end up giving it to him