This post is a part of course From beginner to expert in IoT, so if you’re interested, more information you will find inside the link.
Probably you are thinking which language/languages should I choose to start with IoT? It depends. We have general purpose languages that are useful in creating the whole system, from devices to platforms or microservices and ending on the cloud. I chose only general purpose languages to describe. There are many others and writing about everyone is pointless.
C/C++ and Arduino
These languages you should consider when you want to start working with devices. Embedded languages are useful for creating drivers for the devices. One thing to remember, C and C++ are totally different languages, even if C++ has this same syntax as C. C++ support object-oriented programming and generic programming, however, C support structural programming. Arduino is an environment that bases on C/C++ syntax, but extract only useful features from them.
Embedded development has a high entry threshold. You need to have good knowledge of how to use pointers, manually manage memory and other low-level concepts. These languages have one big advantage, are extremely fast, because C designers added access to assembly language inside the code.
C# and Java
Both languages are similar, support object-oriented programming. They are working as high-level languages with middle entry threshold. Mostly, used for creating web applications, web services or mobile applications. You can consider these languages if you want to create a system or platform that use or shows data from IoT devices or cloud.
You can use C# in embedded development by creating software on Windows 10 IoT and devices that are able to handle this environment. For example, on Raspberry PI 2/3 you can install Windows 10 IoT and add your own features.
Python is an interpreted high-level programming language. It is a very simple language to learn and easy to implement and deploy. Used in Machine Learning to create algorithms. As an embedded language, you can write drivers and software for IoT devices. For beginners Python is the best programming language to start with.
One thing to consider when you want to implement embedded software it’s Python’s performance. Python main goal is deployment speed, however, C/C++ targeting for runtime speed. Sometimes devices don’t have enough memory to use runtime boosters like JIT (Just-In-Time) compiler. Another approach is to use Cython, a framework created for performance that compiles code to C/C++. Cython is a mapper of C functions for Python.
Most popular frameworks for IoT is Johnny-Five and you can build own microcontroller working on Arduino’s board. For machine learning enthusiast developers created a framework called TensorFlow.js.
Which language you will choose depends on you. I’m .NET Developer so I’m working with C# and Azure environment. Additionally, I’m building microcontrollers with C/C++. For experienced developers, C/C++ and one more language to build platforms would be appropriate.
You think that I forgot the language that is appropriate for IoT? Leave a comment and I will add it.