Is there a game or application you want to quickly add Myo support to? Did you just get a Myo armband and want to do some rapid prototyping before diving into the full SDK? Then Myo Script is for you: Simple Lua scripts that let you bind hand poses and arm movement to keyboard and mouse actions.

We’ve broken down Myo Scripting into two tutorial series. Start with our Getting Started with Myo Scripts Tutorial where we cover the basics of Lua scripting, using poses, and how locking works. Then, move on to our Orientation and Advanced Gestures Tutorial where we use orientation, onPeriodic and mouse control to build a REAL script for controlling Flippfly’s Race The Sun. Links below!

Getting Started with Myo Scripts

First script with blank onForegroundWindowChange2

  1. Setup – An introduction to Myo Scripts and how to set up your environment
  2. You are now a Programmer – Writing your first function
  3. Strike a Pose – How to handle hand poses
  4. Pressing Any Key – Pressing hotkeys in respond to poses
  5. Shake It – Vibration and locking behaviour
  6. The End, and the Beginning – Wrapping up with the last few callbacks that aren’t onPeriodic

Orientation and Advanced Gestures

Race The Sun

  1. Racing the Sun – Introducing what we’re going to do, setting up a skeleton script
  2. Wait for it… – Implementing onPeriodic to handle orientation data every 10 ms
  3. Don’t YAWn, this is important! – Using arm rotation to fly a glider
  4. Jump! Jump! – Creating”wave up” and “wave down” with roll
  5. Mouse Control Enabled – Controlling the mouse cursor
  6. Beyond Scripting – The completed script, and a discussion on when not to use scripting

Want to go a bit further? The #MyoCraft series often features Myo Scripts. You’ll find a lot of best practices, neat techniques, or APIs we haven’t covered in these tutorials. Take a look!

Otherwise, that’s it! Myo Script is pretty powerful and not very hard to learn. If you do have any questions though, feel free to hit me up on Twitter (@thalmicdev) or post in our Developer Forums. Don’t forget to subscribe to this blog for all the latest developer content, and sign up for our newsletter for key announcements!

Good luck, and happy coding!

Newsletter

Enter your email address and get all latest content delivered to your inbox every now and then.