IoT and M2M Cloud Controlled Programmable Hardware

My friend and Cognizant colleague the ever opinionated Peter Rogers shares more of insights into the world of IoT (Internet of Things) geekdom and how it really works under-the-covers.
__________

Facebook invested more cash this week when they acquired one of my favourite Kickstarter projects Oculus VR for a seemingly ridiculous $2b. The VR (virtual reality) headset was the best in class technology (in its price range) and had just added a head-tracking software solution to reduce motion sickness. Of course it wasn't just the VR headset that Facebook acquired, but the CTO of Oculus VR, who is no other than the legendary game creator John Carmack.

There is every indication that Facebook will let Oculus VR do their own thing but I do worry about the lack of support from game developers, so John Carmack needs to rally the forces. We all agree there is money in wearable technologies in 2014, right? I actually classed virtual reality headsets as my favourite form of wearable technology, but I am a gamer at heart and spent a lot of time playing VR games in the local arcades as a teenager/adult. With the problems of motion sickness being alleviated and fast refresh rates then we can all look forward to recreating scenes from Disclosure very soon and it proves this is happening now.

IFTTT

I was recently looking into IFTTT (if this then that) which is a service that lets you create powerful connections of Internet services. Channels are the basic representation of online services (Facebook, LinkedIn, Evernote, etc.). Triggers are actions that place on a channel, such as “I check in on Foursquare” or “I am tagged in a ridiculous picture of the office party on Facebook”. Actions are the tasks to perform such as ‘send me a text message to warm me of photos I am tagged in on Facebook”.  Recipes are therefore the final ‘if this than that’ statement which combines triggers on channels with actions to perform. You can have personal recipes, one example of such being a text message warning system for photos that you are tagged in on Facebook within days of an office party.

I didn’t realise until recently that some of the non-enterprise MBaaS (mobile backend as a service) systems offer a similar IFTTT construct. If we look at Firebase which is probably more of a real-time connectivity platform than a MBaaS, but has come into the spotlight after a strong partnership with Famo.us. Firebase offers hooks to inject conflict resolution logic into the proceedings. Likewise, Telerik  allows you to inject custom JavaScript code to be executed before/after CRUD (create/read/update/delete) operations on data items. This offers a simpler alternative than a Node/GAE service tier and with the merging of API Gateways and Enterprise MBaaS on the horizon (a topic for a later Blog) then I have a strong feeling we will see this level of configuration-programmatic control in the near future, especially in the wearable space.

Tessel

Tessel start with asking a great question, “How do you teach web developers about hardware?” and it is a question I have long been pondering from a resourcing perspective. The answer they give is fantastic, “You don’t. You teach hardware about web developers”. You use familiar web development language such as JavaScript and Node to make programming hardware a much higher level construct.

Tessel is a micro-controller that runs Embedded JavaScript. The guys at Tessel seem to think that JavaScript is the perfect embedded language and I am inclined to agree. Tessel are targeting the affordable embedded processor range of Cortex-M0 to Cortex-M4 which are the lower end of the performance spectrum but come in at the $4@1k range. The options are to either run a JavaScript VM (which comes in at around 10Mb of memory) or run a Lua VM (which is highly portable and comes in at around 30K). I was curious what Embedded JavaScript actually was and I guess we will see quite a few definitions of cut down versions of the ECMAScript but Tessel have a unique take on all this. Originally on a local computer there would be a JavaScript file and a g-zipped Lua file which was then sent to a Tessel micro-controller which ran a Lua interpreter. To improve performance they have now moved to having a JavaScript file on the local computer and then on the actual Tessel they will compile JavaScript to Lua bytecode and run this through a LuaJIT (just in time compiler) based custom RTOS.

I remember all of the MEAPs (mobile enterprise application platforms) used to support Lua and soon everyone quickly moved away to the more familiar JavaScript language. Corona was the first to see an exodus of game developers due to the closed nature of the solution. Now in the MCAP space everyone is moving away from JavaScript VMs to cross-transpiled / cross-compiled JavaScript solutions (Hyperloop, Cocoon, Intel XDK). This means you get to write in JavaScript but you end up with native code which is a win-win – unless you hate JavaScript. The future is that it will become feasible to embed in every product a micro-controller powerful enough to run a high level language but for now JavaScript (or Embedded JavaScript as it will be called) seems to be the language of choice.

Firmata

I later discovered trailr which allows you to build and deploy Arduino ‘environment-aware’ sketches over WebSockets. This basically means that you can effectively reprogram the hardware by sending an environment configuration over the air. This led me onto Firmata, which is a generic protocol for communicating with microcontrollers from software on a host computer. It is intended to work with any host computer software package. Basically, this firmware establishes a protocol for talking to the Arduino from the host software. The aim is to allow people to completely control the Arduino from software on the host computer. Firmata is therefore a simple Arduino sketch that allows you to control all of the pins on the micro-controller dynamically without loading a new program on the board every time you want to do something.

SkyNet and Cloud Programmable Hardware

I have to mention SkyNet once again after they amazed me by lighting up their office with Phillips Hue light bulbs that change colour (red or green) as their stock price fluctuates (using the Yahoo Stock Market API). You can see the video here at  https://www.youtube.com/watch?v=ZNiHQXmawys. SkyNet have firmware that allows an Arduino to automatically connect to SkyNet and await Firmata instructions. SkyNet then becomes the compute cloud for controlling devices and collecting sensor data without CPUs or custom device apps.

As Chris from SkyNet says, “You could literally duct-tape an Arduino, MicroArduino (https://www.kickstarter.com/projects/microduino/microduino-arduino-in-your-pocket-small-stackable), Spark device (https://www.spark.io/), or RFduino (http://www.rfduino.com/) to a light pole with a small rechargeable battery and solar cell.  It connects to SkyNet allowing you to stream sensor data from connected sensors or you could turn on pins for lights, relays, motors, etc. via SkyNet messages. SkyNet messages could be sent from people all around the world.”

I must admit that I find the whole concept of Cloud controlled programmable hardware very exciting.


*************************************************************
Kevin Benedict
Senior Analyst, Digital Transformation Cognizant
View my profile on LinkedIn
Learn about mobile strategies at MobileEnterpriseStrategies.com
Follow me on Twitter @krbenedict
Join the Linkedin Group Strategic Enterprise Mobility
Join the Google+ Community Mobile Enterprise Strategies

***Full Disclosure: These are my personal opinions. No company is silly enough to claim them. I am a mobility and digital transformation analyst, consultant and writer. I work with and have worked with many of the companies mentioned in my articles.

Interviews with Kevin Benedict