First step: connect the PS2 to the arduino (the box on the left is the receiver. The level shifter is the circuit board it's plugged into).
Next up, a quick test to make sure we are getting the signals across. I load the arduino with a test program for the PS2 interface and give it a whirl:
At first I was getting garbage in the Serial Monitor, then I found out that the test program expected to run at 57.6Kbaud. I changed the Monitor's baud rate, and voila:
We are in business.
Next up was the MP3 trigger. It takes, as I said, a micro SD card to hold the mps. I downloaded the "official" sound set from astromech, as well as the PADAWAN sketch. The instructions say to copy the MP3s over one at a time so that they appear in order on the file, but when I did that, they were all hosed up. Some triggers played, some didn't. Nearly none of the triggers matched up to what they were meant to play.
A quick call for help on astromech revealed that OSX is a bit bad about this. I chucked the micro SD card into a Windows box, and lo and behold: a lot of metafiles created by OSX were throwing the system off. I deleted everything but the actual MP3s, loaded it back up, and was in business.
(Pictured: MP3 trigger board in red hooked to an amplified speaker for testing)
So, lessons learned:
- When running a sketch that sends output to the serial monitor, always be sure to double-check the baud.
- When copying files to an SD card where you really, really don't want anything on there but those exact files, avoid OSX. Maybe go with Windows or Linux.
Oh! Forgot to mention: Wednesday marked two months down, ten to go. I think I'm making good time, knock wood.
No comments:
Post a Comment