Skip to content
mikebohlmann edited this page Dec 31, 2015 · 3 revisions

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.

Demo: https://www.youtube.com/watch?v=q9OXkD8ghBs

Components

Scripts

Put the files in the Scripts folder into /root/ on the Yun. See Sound Effects for more details.

Sound effects

This contraption will play random audio sounds, but you'll have to find those yourself. By default the scripts look in /mnt/sd/sounds/ and /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

Debugging customizations

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.

Clone this wiki locally
You can’t perform that action at this time.