Best Language To Learn For Robotics & IoT?

5
(1)

My aim for this post is to get you to ultimately decide for yourself the answer to the question: “What is the best language to learn for Robotics & IoT”.

 

This is a very common question but the answer really depends on you and what you would like to achieve.

So by the end of reading this post I hope to have you to make the big decision on what language YOU should learn if you’re looking at a future of IoT, robotics and automation..

Contents

Introduction

There’s so many different fields in IoT, Robotics and just Information Technology in general.

We are all very different people and we all think different and I’m hoping that you can make this decision on your own without me, or anyone else telling you what to learn.

 

I really need to point out here that this is from MY perspective and my opinions and I’m not claiming to be a developer, because I’m not.

I learn for fun.

 

If I can make a huge salary by doing what I love then that’s a big bonus.

But I would not agree to anyone studying a language just because there’s a big gap in the employment market for it.

 

Time moves on, and so do languages.

My advice is to learn what looks good and what you feel is right for you.

best language to learn for robotics

If you’re not happy with the language of your choice then my advice would be to try something else, it’s no big deal.

 

In fact, it’s good to compare languages through your own experiences anyway.

And don’t forget to have fun! If you’re not having fun, then your not learning the language. Simple.

 

I believe the best way to learn a language is to find a small project that looks good to you.

 

Then, break the project down in to smaller, logical steps.

All you need to do then is to code the individual steps.

best language to learn for robotics

By working towards a project goal, it get’s you understanding the language better than if you were to just beat around the bush by learning individual examples.

If all you’re interested in is making money, then firstly, good luck with your er.. career.

 

Here is a good article over at Codemaster.io that will explain salary ranges because I won’t be covering that here.

However, if you’re interested in hacking to learn and not learning to hack then read on.

Now I will go through some common languages, where they are used and why you would want to go a certain path.

 

Are you ready to find out what your language of choice will be? Lets go!

Languages Have Similar Concepts

When looking for the best language to learn for robotics and IoT you will notice that many languages use the exact same concepts.

 

If you’re not using a mark-up language like HTML then you will most certainly come across loops, functions,variables, boolean logic and strings to name just a few.

 

Sometimes languages use different names for these concepts but they  essentially are the same thing. 

Scripted VS Compiled

In some languages when we are writing our source code, we will need to compile the source code and create executable code.

But in other languages we run the source code through an interpreter.

 

It’s by far much quicker to practice our coding through an interpreter as compiling the source code begins to get very tedious if we are  doing it every time we change a minor detail in the source code.

 

The compiling process  will also begin  to take longer and longer as our program starts to get bigger and bigger with more lines of code in it.

 

C and C++ will need to be compiled using a compiler. gcc (GNU Compiler Collection) is  the defacto C compiler in linux.

 

Python on the other hand, does not use a compiler and it is ran through an interpreter.

best language to learn for robotics

We can simply run our program without the need to compile it and this is a much quicker method to test our program.

 

Now, there are differences in performance and other factors as to why we would choose a compiled language over a scripted language but as a beginner just starting to code, this should not be a factor in selecting what language to create a project in, and you shouldn’t worry about this at all at the moment.

 

You won’t see much commercial software that’s created from scripts. That’s because the source code must be given away.

Most (if not all) commercial software will be compiled in to executable code.

 

Python for example, will not be used to create software that is to be sold, however, in the open source community you will find so many programs that are written in Python for many people to collaborate and create free software.

High Level VS Low Level Languages

Another important aspect when looking for the best language to learn for robotics and IoT is the difference between high and low level languages.

 

Low level languages such as C will have you in charge of memory addressing.

 

When we create software that’s going to be controlling hardware we would use a low level language.

 

Coding in a low level language and working with hardware is what is known as “working at the bare metal”.

 

C is very versatile and it’s not just restricted to working with hardware as graphical interfaces can be created using C too. 

 

In contrast to C, Python is a high level programming language. It’s possible to use Python to create software using less code than you would need to in C.

 

Because C gives us the very basic building blocks, we would need a lot of C code compared to Python.

 

However, because Python is a high level language, we wouldn’t use this language to create bare-metal code.

best language to learn for robotics and IoT

CLI or GUI Programming?

As you begin to code for the first time, you will most likely not be creating any graphical programs and so you will be aiming for a text-based application to begin with.

 

There are always exceptions to any rule in computing (if you haven’t figured this out all ready) but if you decide to go the graphical route, and you decide to create a game then you will need to choose whether you’re going to create a 2D or 3D game.

 

Bear in mind that these programs will have a steeper learning curve and you will no doubt get very frustrated many times over.

 

Python offers  some excellent libraries to help you create tools complete with a graphical window with all the user interface components too.

Web Front-End

Even with all this automation and robotics, we will still need a human to view data or manually change settings over the internet and so we will need web front-end applications.

Here is where you’re most likely to find the biggest variation of different programming languages that are used, and many developers tend to create software in web front-end.

 

I seem to be mentioning Python a lot in this post, and that’s because it’s such a versatile language and it can be used for many different applications.

 

A very common Python framework that’s used for web development is Django so this would be  the place to go if you’re looking at web front-end development in Python.

 

Django home page can be found at djangoproject.com

Another common web front-end framework is Ruby-on-rails.

 

If you haven’t guessed already, this is for the Ruby programming language.

 

I don’t really hear about Ruby being used so much, however it seems like the developers who do code in Ruby seem to like it quite a lot.

Ruby home page can be found at ruby-lang.org

best language to learn for robotics and IoT

HTML seems to be the most obvious language that comes to mind when talking about web front-end languages.

 

However HTML is simply mark-up language and you won’t learn much about programming concepts here.

 

Although if you are planning on developing for the web then it is most certainly a requirement if you want to be taken seriously.

 

If you do learn HTML then you will also want to know CSS as this is used for styling web pages, and it is  certainly a good idea to know as much as possible about Javascript, and also PHP too as this will be coded with the HTML.

 

There are WAY more languages that are used in web development that I haven’t mentioned here.

 

If you do go down this route then be prepared for learning multiple languages to become efficient in this area.  

 

FREE Download: CIoTP Checklist!


The ‘Certified Internet of Things Practitioner’ Certification provided by CertNexus is an excellent blueprint to begin learning IoT.

To download your CIoTP PDF CheckList file Click Here
CIoTP checklist

Server Back-End

Although not a programming language, bash (Bourne Again SHell) for linux makes an excellent place to code (and my personal favorite).

 

Many servers on the internet are running linux and it’s a very powerful tool to automate scripts in bash.

 

Bash is a scripted language so no need for compiling.

 

This website (installtekz.com) runs on linux and I usually script automation tools that run regular backups at specific times of the week so once the script is setup, I just leave it to do it’s thing without any interaction from me.

 

If you’re working on a web server back-end then you may want to know some PHP (PHP Hyper-text Pre-processor).

 

PHP is server-side code that is very good at  making calls to a database (which also resides on the server) and sending the results to the user who downloaded a web page.

 

We can also get PHP to call a bash script which I find very useful.

 

PHP is mainly used by web front-end developers but it doesn’t hurt to know a little of any language.

 

I also mentioned that we can have a database in our server back-end and I will cover that in the next section.

 

Perl and Python are great languages to know if your working on a back-end linux server too. We can create very powerful tools with just a few lines of code by using these languages.

 

Perl is a scripting language and so you won’t see many graphical tools (if any, I’m not quite sure if it’s possible?) that’s written in perl.

best language to learn for robotics and IoT

Databases

“Internet of Things” is all about the sharing of real-world data.

So where are we going to store all of this data? In a database of course.

If you’re going to be learning to code in a server back-end then an essential database to know is MySQL.

Looking for the best language to learn for robotics and IoT could well be MySQL.

 

Statements are written for MySQL that query the MySQL database and these are known as query languages (SQL = Structured Query Language).

 

This is a very common database as it scales up really well and it’s free for anyone to use.

If you work on a server with a database then the chances are that the database running is MySQL.

 

It’s important to know that other database’s exist too.

After studying MySQL then you may find yourself learning NoSQL, MariaDB and Oracle too.

 

Gaming

You may wonder why I mention gaming in an “Internet of Things” and robotics post..

Well who knows what the future holds for gaming and what we will have at our fingertips as VR progresses and more real-world interaction technologies.

And just to make this post complete I have included gaming here as I didn’t want to leave anything out.

So maybe games developers will be building robots very soon too?!

 

Well choosing what programming language to learn here is only part of the decision you will need to make.

 

You will also need to know what platform you are wanting to develop on.

 

Are you wanting to create mobile app games, and would that be android or IOS? or maybe a web based game?

There’s a lot of choices out there but it all comes down to your personal decision.

best language to learn for robotics and IoT

Mobile Game Development

Web-based block-like tools

If you’re first starting out then I would certainly recommend using Kodular or the more simple web based platform, App Inventor 2.

 

I won’t go in to detail here on these two options as I will talk about then further down the page, under the ‘Block-like tools’ section.

 

Unity

If you’re looking for something different then another choice could be the Unity framework which is a great engine for creating 3D games.

The Unity home page can be found at unity.com.

 

Unity, just like Kodular and App Inventor has a large community of people to help you if you ever need it and is full of documentation so this would be a great place to start if you’re looking at building games in Unity.

PC Game Development

If you’re wanting to create some PC games then you will need to ask yourself this: “do I want to give away my game for free of am I going to sell it?”

 

The reason for this is that if you use a scripting language such as Python then you will need to give away the source code.

 

Although Python would be a great way to start as Python offers a great library for game development called Pygame and I would certainly recommend checking this out.
 
However if you’re planning on selling your game then you would want to use a compiled language. 
 
This would generate a binary executable, making it difficult for others to financially benefit from your creation.
best language to learn for robotics and IoT

Mobile Apps

At the time of writing (2020) there are only two main contenders for mobile app platforms.

 

These are Apple’s IOS and Google’s Android.

 

Microsoft has had it’s attempts to create it’s very own app market but so far it’s been a failure.

Apple mainly uses the Swift programming language so if you’re wanting to develop apple apps then this would be the best place to start.

 

Android has used Java as it’s language of choice up until 2017 when Google announced it will be looking at Kotlin as it’s language of choice going forward.

 

There are other mobile device vendors out in existence but unless you had a specific reason to veer away from IOS and Android then I wouldn’t even think about doing so as of today.

 

Kotin’s home page can be found at kotlinlang.org

Swift can be found at swift.org

 

best language to learn for robotics and IoT

Embedded

If you’re looking for the best language to learn for robotics and IoT then embedded coding is a must!

Embedded coding is the creation of software built for the purpose of specific small computers.

The two languages that instantly come to mind here is Lua and C/C++.

 

Some really cheap and easily available project boards can be bought today.

 

The nodeMCU (ESP8266) developer board for example, is programmed using Lua and is said to be a relatively easy language to learn.

 

Another cheap dev board is the Arduino.

This uses the C programming language.

 

Arduino offers an excellent IDE which is cross platform (available over many operating systems) and also supports many boards, not just Arduino! 

 

I think These are excellent ways of learning to code.

 

The reasons here being that there’s a huge community for Arduino that offers a huge range of projects from people around the world who give away their code.

If you would like more information about what an Arduino is then you can check out my post: “What Is Arduino? A Beginner’s Introduction“.

 

Another reason these project boards are great for learning to code is that the electronics communicate with the real world by using sensors for inputs and components such as LED’s and motors for outputs and you can see your code in action that doesn’t belong on a computer screen only.

 

Don’t be afraid of learning a little electronics here either as I see so many developers turn white when ever the word ‘electronics’ is mentioned.

 

When I was young I wanted some micro-controllers to play around with.

 

But at the time, the only option was PIC micro-controllers and the basic beginner’s kits for these PIC’s were way out of my price range as a kid.

 

Now with these open-source hardware boards and clones which are built with commercial-off-the-shelf components it’s possible to build entire projects for under $10!

 

Check out the Arduino project hub over at Arduino.cc and just look at the variety of projects that others are creating and providing you with guides and code.

Arduino Uno using C language
NodeMCU using Lua language

Desktop Apps

Creating desktop applications offers so much choice in what programming language you could possibly choose.

 

If you’re wanting to build up something quick with a graphical user interface (GUI) then Python would be a good start.

 

If you’re really serious about coding on the desktop then C/C++ would get you very far in a programming career, however it’s not the quickest or easiest way to get there.

 

You will need to ask yourself the question “do I want to create a graphical interface or a text based interface?” and then select your language of choice based on the answer you decide.

 

When I first started out learning to code, everywhere on the net was recommending the BASIC programming language for new coders.

 

As I started out with BASIC it just seemed a little childish to me and I wanted to jump in to the deep end on something more mainstream. 

 

I believe that when it comes down to it, you should settle for something that you are comfortable in using and it does what you want it to do.

 

If you can create software that works for you then that’s all that matters.

But you will most likely be jumping from one language to another before you settle for something you like using.

 

Sometimes this “language hopping” could last over the course of many years.

 

One thing I never do is learn a language that’s vendor specific. C# (C sharp) instantly comes to mind.

If I was going to study C, then I would study C and C++.

 

I wouldn’t lock myself into Microsoft’s very own C# as this would limit me to the Microsoft ecosystem.

 

As C and C++ is not vendor specific and code written in these languages can be compiled over many operating systems. (Known as cross platform).

best language to learn for robotics and IoT

Using Block-Like Tools

It can be very intimidating to see that big, white, blank screen in front of you just waiting for you to create lines of code and eventually build a fully working piece of software.

Kodular is an online web based tool and a great way to learn the basics of Java and learn how app development works in general.

If you start building apps using MIT’s App Inventor 2 then you will have a working android application in no time.

However it does take time and practice to get some really cool apps out in the wild.

Once you get used to App Inventor then I would suggest moving to Kodular.

 Kodular is created from the same code as App Inventor but there’s so much more at your disposal in terms of community help and extensions.

You could skip App Inventor and go straight to Kodular but it will be a steeper learning curve for you as there’s so much more going on here.

  • MIT’s App inventor can be found here.
  • Kodular can be found here 
 
Screenshot showing App Inventor building blocks editor

Should I Use An IDE?

If you’re unfamiliar with what an IDE is, an IDE (Integrated Development Environment) is a software program that helps you create your own software programs.

 

They generally have syntax highlighting which would help you spot problems in your code early and other helpful features. 

 

So should you use an IDE? This is a difficult question to answer and I don’t believe there’s a right or wrong answer here.

 

Some people may say “Yes, you should use an IDE” and others may so “No, you should learn without it”.

 

I believe the language you are trying to learn also plays a factor in whether to use an IDE or not. 

 

I would suggest that you start coding without an IDE for a day, then code WITH an IDE the day after.

It would be best to inter-change between the two options.

 

The reason being here is that if you rely on an IDE all the time then you will become reliant on it for finding your coding mistakes.

This is not good coding practice in my eyes.

 

If, like me you start writing operating system scripts such as batch programs for MS-DOS then all you are expected to work with is either notepad or by using the DOS command line.

Screenshot showing Pycharm IDE
Screenshot showing Eclipse IDE

Same goes for linux.

You can use a graphical text editing tool such as xed, or a command line based tool such as vi or nano.

 

Linux also has a text editing tool called Kate which works great as a multi-language IDE.

 

What seems to be the defacto IDE at the moment for Python programming would be Pycharm from Jetbrains.com which can be found here.

 

Another very common IDE that’s used today is Eclipse. You can find the Eclipse IDE and support/documentation in the link here.

 

Eclipse seems to be widely used for programming in Java but I believe it supports other languages too.

best language to learn for robotics and IoT

Solo Learn App: Free Learning Tool

If you have an android device (maybe available on IOS) then I would highly recommend installing the Solo Learning app.

Here is a link to the app, over on the Google Play Store.

This has helped me out a lot.

It’s great if you have just a few minutes to spare in your day then you could answer a question or two when ever you have time as it offers bite-sized learning.

Another cool feature of Solo Learn is that you can compete with other users and train each other.

This app is quite addictive as it has the ‘gamified’ approach. That is, it uses a point based system to get you competing with other users.

On top of all that, you will be given a certificate of completion when you successfully complete a course! Check out some of mine below:

Solo Learn Certificates of Completion

sololearn certificate
PHP
sololearn certificate
Python 3
sololearn certificate
Ruby
sololearn certificate
SQL

Conclusion

So.. Tell me.. What is the best language to learn for Robotics & IoT?

Now is the time to tell you what language I like to use.

 

So I’m big on electronics and micro-controllers and I work with developer boards such as Arduino and NodeMCU and I love rolling my sleeves up for a some hardcore C coding (so I can do silly things like automating my curtains to open when the sun rises).

 

After C I like playing around in Python to use all the libraries that are available and linux is just a great environment for Python.

 

You will need to be realistic here though when creating some software for the first time as you won’t be creating the next ‘Grand Theft Auto’ any time soon.

 

Rockstar and other commercial game creators have huge teams and budgets. Just look at creating something simple then improve on it every day.

best language to learn for robotics and IoT

If your looking in to learning the C programming language then I would highly recommend the book ‘The C Programming Language’ which was written by the creators of the C language themselves,  Brian Kernighan and Dennis Ritchie.

This is the industry standard book on C. You can find a link to it on Amazon here.

If perl seems to be your thing then I would recommend “the llama book” called ‘Learning Perl’ which can be found on Amazon here.

Hopefully now, you have a good idea of what language you should go for as your first language of choice.

But remember, If it doesn’t work out for you.. maybe think about trying another language but eventually you will find the one for you.

Good luck!

installtekz icon

Quote Of The Day

installtekz

"When wireless is perfectly applied, the whole earth will be converted into a huge brain..." - Nikola Tesla, 1926

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.