MYO: how we made a paper airplane on the radio
Kirill Belyshev, programmer of the desktop and mobile application development team (@ kirill09): We have a lot of geeks in our company. A lot of very geeks. Naturally, my colleagues follow the news of the hitech industry and often become one of the first owners of all kinds of interesting gadgets. Well, or make them yourself. Examples of this include the Romo robot , a project alarm and a home weather center .
Some time ago, I also came across one wonderful project: the guys wanted to make a bracelet, with which you can remotely control a computer and radio models. The device was called Myo.
The idea captured me, I placed one of the first orders, and then a long wait lasted. And recently, I received a treasured parcel in the mail. After playing with the device, I told colleagues about it. This topic interested them very much - we even decided to shoot a short video. I want to talk about the results of our experiments with a wireless control device in this article.
Experiment. Use MYO to control gadgets
Philip Panfilov, Mail.Ru Mail Programmer (@Ponf): A medium-sized bracelet. The rubber jumpers connecting the Myo elements turned out to be rather tight, the bracelet will not fly off your hand, even if you swing it hard. With a computer, the gadget is connected via a wireless (it's obvious) USB-receiver. Moreover, there are no controls on the bracelet, he himself recognizes that he was put on his hand and initiates a communication session.
After installation, the branded application showed me a tutorial with which I got an idea of how to use Myo. At first it was very unusual. All the time I wanted to find some button, I had to constantly remind myself that the device only understands hand gestures, and the gestures are completely certain. Sitting tightly on the arm, the bracelet registers weak electrical impulses during the contraction of certain muscles, and sends the appropriate commands to the computer. The built-in battery is charged using a USB cable.
Having experimented with managing iTunes and PowerPoint, I quickly realized that Myo deserves a more worthy and interesting application than switching songs. Upon reflection, I remembered that I had long been idle wireless module control paper airplanePowerUp 3.0 , once ordered on Kickstarter. It is a small Bluetooth-module with a propeller and a steering wheel connected to it. But the most interesting thing is that for him there is a description of the control protocol via Bluetooth, so you can write your own application. A great candidate for integration with Myo!
For all this economy to work together, I needed to write a small application, the task of which is to translate the movements of my hand into commands to change the angle of the rudder of the aircraft and the speed of the propeller. I chose Objective-C as the language and got down to business.
With Myo, everything turned out to be quite simple: there is an official SDK for it, which includes a framework that can be connected to the OS X application and then use the C ++ library to manage the bracelet. In addition, for Myo there are binders in all known and not very programming languages, so connecting a bracelet to the application was not difficult.
With PowerUp, everything turned out to be a little more complicated, since on the Internet, there was nothing but a description of the protocol and the Android application on GitHub. But nothing, armed with docks for the protocol and working with CoreBluetooth, I wrote a simple library that allows you to connect to the airplane and control it through a simple interface. The library code is available on GitHub .
As a result, according to my idea, raising a hand was responsible for changing the speed of the propeller, tilt - for the angle of rotation of the yaw wheel, but in order to use Myo's gesture recognition capabilities, I hung up “starting the engine” on Fingers Spread, that is, to spread my fingers.
Luck didn’t smile at once, I had to calibrate Myo several times, as well as to tune the airplane control parameters before we managed to achieve its clear reaction to hand movements.
Of course, a paper airplane cannot be called an ideal radio-controlled model. But still, I managed to partially correct his flight using Myo. My colleagues and I shot a video that I want to share with you. Now the next in turn is the radio-controlled car of my friend, equipped with a full-fledged tiny ICE.