#Myo – Starting as a developer with some C++ basic code

Hi !

Let’s get a little deeper into the Myo armband. Myo read electrical signs from your arm and it can detect up to 5 distinct poses: wave left, wave right, spread fingers, fist, and pinch. It also has a couple of motion sensors, so with all this information you can start to think into possibilities.


The armband collect and share all this information via Bluetooth, so nowadays we can use the Myo armband connected to almost, any device. Out of the box there are samples to control VLC, Spotify, or even drones or the Sphero toys. And, of course, because this is gesture based, you have a PowerPoint controller !

In order to start to use all these features as a Developer, we need to enable the Developer Mode. In the Myo preferences app, go to the General section and we need to enable the 5th option.


Now we can access the debug console which is something we can use later in our development process.


So, now is time to download the SDK. Until today Myo have released SDKs for

  • Windows
  • Mac
  • iOS
  • Android

The SDK details are a 10 minutes read (here). On Windows, MYO provides a single DLL for both architectures, named myo32.dll and myo64.dll


The core of the SDK is a library: libmyo. This library allows applications to interact with the Myo armband. All functionality in libmyo is exposed through a plain C API.


The SDK provides data to the application in the form of events. There are three categories of events: spatial events(corresponding to spatial data from a Myo armband), gestural events (corresponding to gestural data a Myo armband) and auxiliary events.

There is plenty of information about the internals of the SDK, but let’s go to see some code. In the SDK folder we can find the C++ header and hpp files to be used in a sample C++ app. So let’s go for this.


In a console app, we need to inherit from DeviceListener to have access to the Myo armband features.


Using the Myo hub, we can access to the EMG information, the orientation / position information and also the poses information. In example, once a pose is detected we can notify the user about this pose or take additional actions.


A nice starting point are the 3 C++ sample projects included in the SDK. However I know that not so many people are used to C++ so in my next post I’ll switch to C# thanks to one of the many Myo.Net implementations available.


Greetings @ Toronto

El Bruno



  1. Dear Bruno,
    since the official thalamic site is down, is there any way to get the myo sdk from you? (Earlier I have used only an unofficial python binding, so earlier I have not downloaded the sdk itself. It was perfect for a long time, but right now I should operate it through c++/VS environment, and it would be rather a huge effort to reimplement the raw protocol.)
    Thank you in advance: Miklos


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: