Sunday, February 22, 2015

PADAWAN stage one: control and sound

Been a quiet week, mostly because of this stupid cold. I did manage to read up on the PADAWAN control system, and decided to go with it as it seemed a fairly simple way to get started. I dug out my old Arduino UNO, got a Lynxmotion wireless PS2 controller with a "level select", and an MP3 trigger board with a micro SD card.

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.
Anyway, hopefully I'll feel good enough this week to get back to 3-D printing. In the meantime, I've got a drive motor and controller on the way, and the Radio Shack nearby is going out of business. I saw some SLA batteries there going cheap. Hmm...

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