Over a million developers have joined DZone.

Building the Internet of Things: HTML5 for Microcontrollers

· IoT Zone

Access the survey results 'State of Industrial Internet Application Development' to learn about latest challenges, trends and opportunities with Industrial IoT, brought to you in partnership with GE Digital.

What's one basic, practical problem with an Internet of Things?

It's not an Internet if its protocols are proprietary. And things, to be inter-netted, require bi-directional communication.

But Websockets enables bi-directional communication and is part of the W3C-produced HTML5 protocol.

So why not let microcontrollers talk to the Internet via Websockets?

Simple idea. Now here's a real-world demo from mbed sending data via Websockets in JSON format. An HTML5 Canvas element can then easily read and display the data in any modern browser.

Check out a 2.6-minute video overview:


This example uses an mbed microcontroller and an mbed server, so the C/C++ code obviously won't run unless you own their particular commercial device. And you might want to look at mbed's websockets server (written in Java) to peer a little more into how the system actually works.

But you get the idea, and it's a cool one.

The IoT Zone is brought to you in partnership with GE Digital.  Discover how IoT developers are using Predix to disrupt traditional industrial development models.

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}