Star Wars: Armada Electronic Initiative Tracker
I found that I was forgetting to flip the initiative tracker, and so I decided to make something that would be its own fun little element to the game.
- Arduino Yun (https://www.arduino.cc/en/Main/ArduinoBoardYun)
- 128x64 OLED LCD display (I used this one: http://amzn.com/B00O2LLT30)
- Millennium Falcon speaker (https://www.thinkgeek.com/product/iqpu/)
- USB to headphone jack audio adapter (http://amzn.com/B00IRVQ0F8)
- MicroSD card in the Yun
Put the files in the Scripts folder into
/root/ on the Yun. See Sound Effects for more details.
This contraption will play random audio sounds, but you'll have to find those yourself. By default the scripts look in
/mnt/sd/sounds/pewpew/. The sounds directory is created on the MicroSD card. You'll need to rename files with spaces and such. See the playRandom script for some additional information.
Additional things to install on OpenWRT
You'll need to install two additional packages for the Linux distro to work as desired. After connecting to the Yun with your favorite SSH client, run these commands. The first one adds USB audio support, the second adds an audio decoder program called madplay, and the third adds the randomizer for the pewpew feature.
opkg update opkg install kmod-usb-audio opkg install madplay opkg install coreutils-shuf
If your code compiles after making changes to the Arduino sketch and you get no sound, it's probably because it's using too much memory. You have to squeeze every possible bit from the Yun's memory.