I got the parts from many different places, Jamma Boards being the only one I can recall for the arcade parts (I know I at least got the joystick from here, probably all the buttons, too). I got my Raspberry Pi Model B from amazon for around $45, a clear case for $13, and a 32gb SD card. The wiring was just what I could find at the local electronics store (20 gauge, maybe?). And I had to get a Teensy (the 2.0 was the most recent model at time of purchase, so that's what I got) for $16.
I'd had, at this point, no electronics experience outside of basic soldering, and little construction experience, too. Everything ended up being a challenge for me during this project, but almost entirely due to my inexperience.
I first made sure all my wiring worked, so I had to learn C to program the teensy board (based off of someone else's USB gamepad code). During the soldering for the board, I ended up frying one of the contacts due to improper soldering equipment, so I had to reprogram the board to make up for it, so if you look at the code it will be a little... imperfect. But it all ended up working, every button registered with the computer as a generic USB gamepad (which was important, because the RPi ran Linux). I suppose that, if I really knew what I was doing, I could have just attached the buttons to the GPIO pins, but I wasn't about to tackle that beast. The code can be found here.
Secondly, I got the RPi ready to work with the controller. I went through the initial setup and installed MAME4all-Pi, and then the arcade games themselves.
Then I had to build the box itself. It's not well built, and it's a little thicker than I'd like, but due to hasty designing, I got what I got and haven't gotten around to fixing it yet. Everything works, it's just a little imperfect. I also had to drill a hole into the back of the box in order to run the external cables through. I took the controller design online and modified it a little bit and ended up with this:
I'll admit the button placement near the joystick was a horrible idea, but I was dealing with size constraints at the time.
After finishing the box, putting all the buttons in, screwing down the RPi case, and dealing with the wiring, I ended up with this on the inside:
(not shown: teensy)
Plugging a keyboard into the RPi, I only have to navigate to usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full and run ./mame and everything ran!
I found and old cost analysis spreadsheet I made awhile back and this was the official rundown at the end:
Item | Cost ($) | Quantity | Total Cost ($) |
---|---|---|---|
Pushbutton | 1.95 | 10 | 19.5 |
Joystick | 8.95 | 1 | 8.95 |
Teensy 2.0 | 16.00 | 1 | 16.00 |
RPi | 46.83 | 1 | 46.83 |
Power Cable | 8.99 | 1 | 8.99 |
Case | 13.59 | 1 | 13.59 |
32gb SDHC | 27.74 | 1 | 27.74 |
141.60 |
More than I anticipated, but still not bad. There's definitely room for improvement, too, which can bring the price down (I suspect that it can still be done sub-$100).
No comments:
Post a Comment