Myo 2 Blink – IoT – Controlling lights with a flick of the wrist
Yesterday I had a meet up on the Internet of Things, and it was Awesome! We started by having an open discussion about the platforms the we are familiar with, and current sensors / devices / services that are defining the Internet of Things #IoT today. The discussion was open forum for about an hour as we ate lunch. As people arrived we were able to discuss the fact that in the age of defining how machines will communicate with one another, machine to machine communication which is really the definition of the Internet of things, will redefine the boundaries of reality.
As machines learn to speak to each other in a way that becomes adaptable and translate themselves instead of needing platforms like are in existence today, could be to have open standards which were conformed to buy all devices sensors etc. except that’s not really a practical solution.
In terms of the implementation, we now have items that are connected to the Internet or connect via Bluetooth or NFC, and that’s just to name a few. It’s much more likely that other protocols will arrive as the need for them presents itself, and translators will begin to provide a schema or maybe a schema list definition of how communication can occur between systems over a common network. Whether that be the Internet itself or some other layer of communication, remains to be seen.
After we got all amped up about what was possible, we started to dive into what we would do for the day. I had brought my Myo armband and an iOS app that received the gesture from the band that I’ve modified. The change sends a post request with the specified gesture to an end point of my choosing.
In this case, we decided to use Octoblu.com so that my endpoint was a web hook to a flow (If you haven’t seen my post on Getting Started with Octoblu, you can Here). The device we chose to connect to was a real world device called a Blink1. The Blink1 is simply an LED attached to a USB for the purposes of testing and displaying results without needing to print text to the screen. You can buy a blink for $45 or less Here: http://amzn.to/1UN1QzH
For this case I assigned every gesture that could be sent from the Myo to the phone to a specific color. In theory we were about to test – that once I made a gesture that the Myo could recognize, the light would change color.
After a couple of small snags we were up and running. I put the Myo on and took the cell phone off of the wifi network to make sure there was no local communication. Once I popped the HelloMyo App open and synced with the Myo it was ON!
(My gateway is running on a MacBook but it could be a PC, RaspberryPi, Phone, etc….)
At that moment I was able to unlock the device and I started to transmit the gesture from the Myo to the cell phone, from the cell phone over the cell network to Octoblu.com, and then from Octoblu.com to the gateway on my office wifi. Once it got to the gateway it was at my local computer which was able to change the color of the Blink1.
The application that I built to do this was based off of the MyoArmband sample app and is now posted to get hub the link is:
In order to see this run properly you’ll need at least a Myo and an iOS device. You’ll also need ability to compile an iOS app and Xcode. If you don’t have all those things don’t worry the video will show you exactly how works in about 15 seconds.
For those of you want to dive then you can import the flow using this bluprint:
Read the README.md doc for the iOS application to get a description of what will be required in order for you to run this yourself.
You’ll also need to connect your Myo to the app by launching the app, selecting connect and hitting “scan”. Your Myo Should show up, and tapping the row should create the connection. The application will display onscreen what gesture it is currently receiving from the armband.