Yet another talking fish hack

These are my fish. There are many like them, but these ones are mine.

As is traditional with these fish, they have been modified. I replaced the original electronics with a raspberry pi SBC, and a little daughter board with some motor drivers, some pull-ups for observing the button on the front, and an audio amplifier which plugs into the GPIO header. They are powered by 2A 6V wall warts, the daughter board also has a 2940 regulator to provide 5V to the raspberry pi. The motors run on straight 6V.

I also put one of those tiny edimax 802.11 interfaces on the raspberry pi. The first fish creates an adhoc 802.11 network, and the rest of the fish connect to it. The school then mumbles amongst itself via multicast packets. So if you press the button on one fish, they all start.

The first fish is the official clock, it multicasts its sample number to the rest of the school. The rest of the fish then drop or repeat blocks of audio samples to stay in sync.

The first fish also has a DHCP server, and will issue addresses to any computer which shows up on the ad-hoc network. There is a web server with the documentation and a CGI page to activate the fish and select audio files.

For each audio file, there may be an animation file. They are just text files with a sample number, motor, and on/off value. The normal fish software also doubles as an animation generator if you run it on the command line.

The fish perform "Who's on first?". I found an audio file on the internet, and spent entirely too long cutting it apart into an Abbot file and a Costello file, for each fish. I then wrote another program to generate animation data for the mouths by estimating the energy of the audio. It worked surprisingly well, though background noise in the audio confuses it.

There are more pictures of the construction here.

Email me if you're interested in the software and/or hardware files.