BBVA Open4u - In what language will the Internet of Things be programmed?

In what language will the Internet of Things be programmed?

It's fashionable to talk about IoT but it's really unclear how you will program there. We explain existing languages, platforms and areas where the Internet of Things is already being worked on.

BBVAOpen4U
|
28 Dec. 2015

We started off connecting to the Internet through our computers. Then we began to do so with our cell phones. Now our televisions, our watches, our cars and even our refrigerators are connected to the network of networks. We are now in the era of the Internet of Things (IoT): and it's only beginning! But, how and in what language can I develop programs and applications for the IoT? In this article we're going to give you a few key tips to get you started so you can contribute to a future that is becoming increasingly more present.

First, choose the hardware

It is estimated that by 2020 there will be over 25,000 million devices or “things” connected. But the “things” (a toaster, a water heater, the air conditioning, etc.) cannot be connected by themselves. You need to build small computers into them to do that job, like embedded microsystems that turn inert apparatus into connected devices. Until quite recently, these systems were expensive and complex. Nonetheless, cheap microcomputers are now coming onto the market that are readily available to the general public, giving rise to a veritable boom in the sector. Choosing between one or other of these microcomputers, therefore, must be our first step to entering the world of development for IoT.

Arduino Uno

It all began with Arduino. Created in 2006 in Italy for educational purposes (open source of course!) a community soon grew up around it. The Arduino Uno is the star board of this project. Its features (ATmega328P processor, 14 digital I/O pins, 32Kb Flash memory, 2kb SRAM, 1kb EEPROM, etc.) make it ideally suited to the programming of microcomputers and for you to take your first steps in the IoT world.

Raspberry Pi 2

The evolution of Arduino and a genuine phenomenon since the appearance of the original Raspberry Pi in 2011. The current jewel in the raspberry crown is the Raspberry Pi 2 that comes with an ARM Cortex-A7 processor, 1Gb RAM, 40 pins, 4 USB ports, HDMI port, interfaces for camera and display, slot for microSD, even support for Windows 10 and the option to program in Python, Ruby, C or Visual Basic, is truly awesome given its extremely affordable price, open source and its active and populous community in the background. Ideal for any project you might come up with.

If you want something a little less “sophisticated”, this Christmas they have launched the Raspberry Pi Zero on the market, a small (albeit complete) microcomputer for a mere $5.

BeagleBoard

As possibly the biggest rival of Raspberry Pi at present in the world of open source, low-cost microcomputers you have a Texan project, the BeagleBoard. It's latest model, the BeagleBoard Black, has particularly attractive features: ARM Cortex-A8 processor up to 1Ghz, 4Gb Flash storage, 512Mb RAM, 2x46 pins, USB connectivity, microHDMI and Ethernet with Linux and Android support. A fine, low-cost device with numerous options for IoT use.  

Intel Galileo

The Intel Galileo is the product of a collaboration between the Arduino Foundation and the all-powerful Intel. It is similar to an Arduino Uno on steroids, based as it is on Intel x86 architecture and a power capacity equal to that of the first Pentium processors in the mid 1990s. The first offspring of the new Intel Spark family, it is ideal for smart home, wearable, and of course, IoT projects.

Kinoma Create

To conclude this overview, we are going to stray a little from the small board and microcomputer area to talk about a more complete and complex project, and one with numerous possibilities, namely the Kinoma Create. Touchscreen, 800Mhz ARM SoC processor, 128Mb RAM, USB 2.0, WiFi, Bluetooth, microSD, speaker, microphone and Linux distribution constitute the main features of a product that offers numerous possibilities.

Let's continue with a look at suitable programming languages

After you have chosen the software, it's time to decide on a programming language to give it life and connect up to the world. You can go for classic languages in which you may be already proficient and get good results, or opt for more specific languages that make it possible to get the most out of the device (even though, it goes without saying, the learning curve will be a lot more complicated). Here are some from which you can choose:

C / C++

Available on practically all the devices reviewed above, procedural, compiled, very hardware focused, not too complex learning curve, etc., features of particular interest when programming the IoTs of this old C rocker (and its development, C++). A genuine back to basics.

Java

One of the features that most influenced in the rise of Java at the end of the 1990s and early 2000s was the multi-platform aspect of this language. That, along with its extended use (few experienced developers would not have had occasion to use it at some stage) and projects like IDE Eclipse IoT, which aim to facilitate the development of IoT with Java, make this a more than interesting option.

Javascript

The idea that JavaScript was simply a language for web clients is now history. A fact that is perfectly attested to by the success of the runtime for servers Node.js. Indeed, Node.js is proving to be an extremely interesting option for IoT programming, aimed as it is at asynchronous events and offering such features as a non-blocking I/O model, scalability, lightness, good performance, not to mention the extensive and highly active community behind it. You couldn't ask for much more to get down to working with the IoT.

Python

Elegant, readable, flexible, etc., Python is without a doubt the 'in' web development language at present, so its transition to the IoT promises to be equally successful. No doubt the fact that in spite of being an interpreted language it can be run on different precompilers and that its executable code is open to being distributed, will greatly contribute to this success. It is the star language to “play around” with the Raspberry Pi, so there must be something to it!

Go / Rust

Two quite modern languages, one created by Google, the other by Mozilla, though both evidently resembling each other (C-inspired, very concurrence and multi-thread focused) and extremely interesting for IoT programming, particularly if you need to handle the aforementioned concurrence ably, both in terms of input as well as output. The learning curve will no doubt be tough (though there are increasingly more references to lean on) but the returns may be well worth it.

Forth

Forth is a language that was especially created for embedded systems and real-time applications, thus it is ideally suited to the IoT. It is not a new language (it was designed in the 1970s) and is stack oriented. Therefore it may prove somewhat illegible, thus its learning curve will be far from easy, but there is no questioning the possible returns to be had.

Assembler

But if all the aforementioned languages are merely child's play for someone as tough as you, you can always resort to the nether regions of the assembler language, get stuck in and fight for every memory byte. No doubt you'll manage to get your IoT device to do exactly what you want, and do so with a minimum outlay. Nonetheless, you may very well loose your mind (or eyes) in the attempt.

And lastly, you connect up to the world

Now you have your devices programmed with the language you most like and/or best suits your needs. They are storing a series of data or carrying out those actions indicated (or doing both). But the real potential of IoT comes into play when you connect up these devices. There are a series of open source applications and platforms for this purpose that can be of great use to all developers.

Node-RED

A simple, visual tool developed on Node.js that uses open source (you can find your code at GitHub), it was designed by IBM and allows for devices to be added (hardware, APIs, services, etc.) to a network and to manage them without any need for programming knowledge. Node-RED is highly scalable, very versatile and genuinely user-friendly.

OpenHAB

Ideal for smart home and “automated home” applications, OpenHAB is a platform that makes it possible for you to communicate with devices that “speak” different languages. It does so by means of a powerful rule engine and a series of native interfaces that communicate over an API. It can run on any device with a Java Virtual Machine (JVM) and is backed by an extremely vociferous and active community.

Google AppScript

On the Google Apps service of the giant Mountain View you have a small, albeit powerful, scripting tool called Google AppScript. The Google AppScript makes it possible for you to automate tasks like collecting data from any device you have connected up and migrate them to another with just a few lines of Javascript code. For example, you can update a website with the temperature data you retrieve from a meter, send tweets that have a predetermined hashtag to a display, etc.

ThingSpeak

ThingSpeak is based on a similar idea to that of Google AppScript but is a bigger project and one with greater possibilities given that, in addition to collecting data sending them, it provides tools to analyze them. An open source App (here you have its code on GitHub), it has a public API that makes geolocation possible. Moreover, it works with Arduino, Raspberry, websites, Apps, etc. It certainly looks to be a pretty good project.

Bonus track: Look for inspiration and study

;

You now have all that it takes to enter the world of the IoT… well, perhaps, you're still missing something of vital importance: an idea. Not to worry, you can always check out Kickstarter or Indiegogo to seek inspiration and spur yourself on with benchmark projects in this little world that are currently on these famous crowdfunding platforms (of which there are quite a lot out there).

If, on the other hand, what you're looking for is more specific, regulated IoT training (which by the way is always a CV or LinkedIn plus), courses, masters and programs are already on offer at entities like Coursera.

Images | arduino.cc, pablobd, eclipsecon.org, openHAB