uXe wrote:and then open up a NES joypad and connect the 8 input pins on the joypad's shift register to 8 pins on the Arduino and you'd have yourself a MIDI controlled NES joypad! You would even have enough spare pins to connect another 8 to a second joypad if you really wanted to...
...or connect 12 pins to a SNES joypad instead and you'd have yourself a MIDI controlled SNES joypad!
Just occurred to me though - not sure if the buttons on the joypad itself could still be functional or if you would need to cut the pins from their previous connections before you wire them to the Arduino... wondering what would happen if you are trying to pull a pin low with the Arduino if it is still being held high by the joypad's built-in pull-ups, or try to pull a pin low by pressing a button on the joypad when it is being held high by the Arduino?
Well you may have a point, will look into this. Off the top of my head, a work-around would be letting the Arduino sacn the KB and then interleave button presses with Midi messages to send to the NES. Haven't looked thru your code, but you are simulating the Game pad with the Arduino? If so, adding a key scan may be possible?
Yog
EDIT- Or better yet, setup a SPI read loop for the CD4021. So a ruff setup:
1. Disconnect cable from gamepad board.
2. Connect gamepad board to Arduino SPI pins
3. Connect NES cable to Arduino
Sound workable?
Last edited by yogi (Dec 20, 2013 8:06 pm)