JavaScript
Article

JavaScript Beyond the Web in 2015

By Patrick Catanzariti

2015 has been a big year for the Internet of Things. We have seen huge advancements in the size and capability of devices, big players like Microsoft and Samsung are really moving into the space and the IoT community overall is starting to grow ever larger! Over the past two years here at SitePoint, it has become a bit of a tradition for me to look at the year that was for the Internet of Things and JavaScript (see JavaScript Beyond the Web and JavaScript Beyond the Web in 2014). Whilst the initial hype and excitement of having JavaScript as a language of the Internet of Things (IoT) seemed to calm down a bit over 2015, JavaScript still continues to pop up as a rather strong option for enabling magic within more IoT platforms than people realise.

In this overview, we’ll look at some of the big movements in the Internet of Things that will enable new possibilities for JavaScript developers and further JavaScript’s potential beyond the web.

Tessel 2

The Tessel 2 (Photo credit: Tessel)

The Tessel 2 (Photo credit: Tessel)

The Tessel is a microcontroller (similar to an Arduino) that ran on JavaScript rather than the typical languages such as C. It was the perfect device to help JavaScript lovers leap into the Internet of Things. Last year it shipped to the world and people made some pretty neat things with it. The Tessel 2 released pre-orders this year and has some very exciting upgrades from the first generation Tessel.

The Tessel was able to run various npm packages, but wasn’t able to run Node.js itself, so Tessel often had to build in compatibility specifically for commonly used packages. The Tessel 2 greatly improves on this by running the real Node.js out of the box. This fact alone made me pre-order it instantly. Access to npm modules brings a lot of potential to this microcontroller.

It also has two USB ports, providing access to USB devices (e.g. webcams) as well as ready made Tessel modules and the GPIO port (to directly connect all sorts of electronics via jumper wires to pins).

Getting Involved Via JavaScript

  • Pre-order Tessel 2 – Pre-order the Tessel 2 from their website and start planning your creations! The Tessel 2 should arrive in January 2016.
  • Official Tessel Documentation – You can start reading up on Tessel development already (Tessel 1 development should be very similar to Tessel 2).

Open Hybrid

OpenHybrid in action (Photo credit: OpenHybrid)

OpenHybrid in action (Photo credit: OpenHybrid)

Augmented reality is a fascinating alternative method of controlling the Internet of Things around us. Rather than putting physical controls on objects, you can view them through an augmented reality interface like a smartphone app and control them in intuitive and limitless ways! Various companies are looking into ways of implementing this but in 2015, MIT Media Labs revealed (and open-sourced) a pretty impressive method called Open Hybrid. JavaScript IoT developers in particular might be very interested by this solution as it allows for application development via web technologies including HTML and JavaScript. Whilst it is still early days for augmented reality, now is the time to start tinkering with its potential alongside the IoT!

Getting Involved Via JavaScript

Samsung’s IoT.js and JerryScript

The Samsung IoT.js and JerryScript pages

The Samsung IoT.js and JerryScript pages

Samsung has put plenty of resources towards enabling JavaScript to be the language for the Internet of Things. In 2015, they open sourced JerryScript, a JavaScript engine for the Internet of Things. It allows JavaScript to run on small, resource constrained devices like the microcontrollers commonly used in the IoT. To me, it sounds similar to what Tessel were attempting to put together in the first iteration of the Tessel but on a grander scale which is open to many more small IoT devices.

IoT.js is another endeavour of Samsung to enable JavaScript within the Internet of Things ecosystem. It was open sourced around the same time as JerryScript. IoT.js is a framework for creating an inter-operable platform for devices using JavaScript. It has been described as a lightweight version of Node.js, however I’ve yet to play around with it myself to get a true feel for how accurate that description is.

Both JerryScript and IoT.js are still in their early stages, so it will be exciting to see how they progress throughout 2016. I’m eagerly hoping for integration with the Samsung SmartThings platform at some point but I haven’t heard of any mention of this yet!

Getting Involved Via JavaScript

  • Official JerryScript Page – The official page for JerryScript contains links to downloading the engine and guides on getting started.
  • Official IoT.js Page – The official page for IoT.js also has a download link and guides for getting started.

Spark Becomes Particle

The Particle Electron (Photo credit: Particle)

The Particle Electron (Photo credit: Particle)

In 2015, Spark became Particle. Spark provided a Wi-Fi enabled microcontroller with their own cloud service allowing for a streamlined method of building devices for the Internet of Things. In particular from a JavaScript perspective, they had a JavaScript SDK and various other compatible third-party JavaScript plugins. After their name change this year, Particle’s range of devices grew.

They began shipping a faster and more reliable microcontroller called the Photon and put a 2G/3G enabled microcontroller named the Electron onto Kickstarter (no need for a Wi-Fi connection to keep the device online!). The Electron is now available for pre-order from their website and is estimated to be shipping in January 2016.

In the end, these developments in their range of devices continue to support the JavaScript API, so JavaScript developers have a whole range of new possibilities this year and beyond! The developer community around Particle is incredible too.

Getting Involved Via JavaScript

Microsoft Windows 10 IoT Core

Starter Pack for Windows 10 IoT Core with a Raspberry Pi (Photo credit: Microsoft and Adafruit)

Starter Pack for Windows 10 IoT Core with a Raspberry Pi (Photo credit: Microsoft and Adafruit)

Microsoft released Windows 10 to the world this year, providing one Universal Windows Platform for multiple devices, including the IoT. They kept JavaScript developers in mind and provided Node.js access within their Windows 10 IoT ecosystem via the Chakra JavaScript engine. At the moment, the main device I’ve seen used with Windows IoT is the Raspberry Pi 2. MinnowBoard Max and DragonBoard410c are also supported. Over time we’re likely to see more devices gain support as the ecosystem grows. One important distinction to make with Windows 10 IoT Core is that it is not a fully featured Windows 10 operating system. It is a stripped back operating system for IoT devices.

Getting Involved Via JavaScript

Evothings

Evothings Studio running on Mac OSX and mobile

Evothings Studio running on Mac OSX and mobile

Evothings, a set of development tools for mobile IoT web applications, really grew and expanded their capabilities in 2015! I stumbled upon them in the second half of the year and was hugely impressed with their offering. They’ve put together an application called Evothings Studio which allows you to develop mobile HTML5 and JavaScript applications with live reload and debugging capabilities. This was especially perfect when I was exploring Estimote Bluetooth beacons, as desktop mobile simulators weren’t able to simulate a Bluetooth connection to beacons. Running Evothings on my mobile and testing through their software made this process incredibly easy.

For JavaScript developers, this platform is also exciting as the Evothings team have a bunch of tutorials showing how to bring quite a lot of the IoT alive with JavaScript.

(As a disclaimer, I’m now working with the Evothings team on a few potential projects because I was so impressed with their stuff!)

Getting Involved Via JavaScript

The IFTTT Maker Channel

The IFTTT Maker Channel

The IFTTT Maker Channel

This year IFTTT released a channel that provided functionality the Internet of Things community had been dreaming of – the ability to make and receive custom HTTP requests within IFTTT. This opened up the service so that absolutely any custom prototype which either makes or receives HTTP requests can work with IFTTT and its many services!

This works incredibly well for Node.js developers as HTTP requests can be made/received in Node.js with ease. Almost any IoT prototype you connect up with Node.js can now be hooked into IFTTT!

Getting Involved Via JavaScript

Johnny-Five Revamped!

The new Johnny-Five website

The new Johnny-Five website

Johnny-Five, a JavaScript programming framework most commonly used for Arduino NodeBot development, revamped their whole website and added a range of new documentation. Their supported devices has grown massively and they have links to assist developers in getting started with Johnny-Five and those platforms.

Getting Involved Via JavaScript

Raspberry Pi Zero

The Raspberry Pi Zero (Photo credit: Raspberry Pi Foundation)

The Raspberry Pi Zero (Photo credit: Raspberry Pi Foundation)

Finally, a rather recent development that provides some exciting possibilities for JavaScript developers (and developers of various other languages too!), the Raspberry Pi Zero. It is half the size of a Model A+ Pi, but can still run with incredible speed and power. Due to Raspberry Pi devices most commonly running Linux, it is quite straightforward to get a Node server running on them. The Raspberry Pi Zero provides an even smaller JavaScript enabled device which I am certain is going to bring some very impressive creations in the coming months.

Getting Involved Via JavaScript

  • The Raspberry Pi Zero Product Page – The Official Raspberry Pi Zero product page where you can find specifications and links for purchase!
  • Streaming a Raspberry Pi Camera Into VR With JavaScript – A guide I put together on how to turn a Raspberry Pi and its camera into a streaming VR camera for Google Cardboard devices. I haven’t got a Raspberry Pi Zero but from what I’ve seen so far, this demo would likely run on the new smaller device!
  • JavaScript Robotics Book – The JavaScript Robotics book on Johnny-Five mentioned earlier has a few Raspberry Pi demos.

Conclusion

There has been an incredible amount of advancements in IoT devices for JavaScript developers in 2015, both directly in truly JavaScript focused devices like the Tessel and indirectly in advancements with the Raspberry Pi Zero. JavaScript developers have plenty of options as they move into 2016. If you are a JavaScript developer and haven’t started looking into how your skills are transferable to the Internet of Things ecosystems out there – look at the above technology and those from my previous roundup articles in 2013 and 2014. JavaScript developers are much more empowered than they realise!

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

  • http://www.adriansandu.com Adrian SANDU

    The world of micro-controllers has been for a long time the fiefdom of C – a programming language that I almost started to hate back in University. With the doors open for Javascript programming, a lot more people have now access to the universe of intelligent devices and this can only be a good thing.

    Thanks for the heads up, Patrick! Good job!

    • Patrick Catanzariti

      Ah yes. Good ol’ C. I think C will still be around for plenty of years to come. In many areas, JavaScript compliments it and provides a good sidekick for web connectivity and simpler coding (I realise using the word “simpler” is very subjective but I can’t think of the right word, some people are just more comfortable with JS!).

  • Siri Innovations

    It was some what better but this code is not helpful to the all for the devices.

  • Patrick Catanzariti

    The Wio Link looks quite cool. I’ve heard both good and bad things about the ESP8266, lots of feedback has said that it’s really buggy and hard to get initially set up but after that it’s alright. Maybe the Wio Link has that process sorted a bit more?

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.