Elm and Myo playing together

I haven’t been able to stop play­ing around with my Myo arm­band since I got my hands on it this week. In truth it’s ruined a few of my plans for the week­end, but boy it’s been fun try­ing to get the Myo work­ing with var­i­ous apps and games.

Elm has also piqued my inter­est late­ly, so what bet­ter way to play with the Myo than to build a game in Elm that is best played using ges­tures? And along comes Thun­der Cow, a light-heart­ed game where you use the fist and fin­gersSpread pos­tures to start and stop a mov­ing arrow. The goal is to time your release so that the arrow stops in the red zone.

Embedded image permalink

To play using the Myo arm­band you also need to add this Lua script into your Myo Script Man­ag­er. After you’ve added the script, head over here to give it a go.

The Elm source code for the game is avail­able here. There is no native sup­port for sound in Elm, so I had to resort to using Elm’s JS interop capa­bil­i­ties to invoke Javascript func­tions to play the mp3 files.