22 Replies Latest reply on Nov 30, 2018 12:55 PM by BigG

    Language for IOT

    nirmal2000

      Which language is better option for learning IOT for beginners?

        • Re: Language for IOT
          Fred27

          Well, you'll most likely be using a microcontroller so I'd say it has to be C.

          5 of 5 people found this helpful
          • Re: Language for IOT
            BigG

            Very much depends on your preferences.

             

            If you are a visual person then perhaps the microbits block editor would be a good starting point: https://microbit.org/code/

            Another visual type coding system would be Node Red.

             

            If you are happy with code syntax but maybe not used to compiling complexities then something like the Arduino IDE would suit (Mbed another C based option with easy compiling). Also microbit is another great option with it's Python Editor option. CircuitPython is another general offering.

            5 of 5 people found this helpful
            • Re: Language for IOT
              dougw

              For a beginner, the learning curve includes the language, the integrated development environment (IDE), the hardware and they also need to consider the cost of all these things. As mentioned above C and Python are two good candidates for language. Python is a little easier to learn but C is more universal. For IDEs, arduino is the most popular and pretty easy to learn, micro:bit IDEs are easier, but limited to micro:bit hardware, TI has Code Composer and Energia (which is like arduino) working together creating a lot of flexibility. I also like PSoC Creator from Cypress because it simplifies hardware as well as software. MBED is another good IDE, but I haven't used it enough to prefer it.

              5 of 5 people found this helpful
                • Re: Language for IOT
                  balearicdynamics

                  Dough, just an objection. If for micro:bit IDE you mean the blocks language, it is true. But thinking to IoT development with micro:bit this visual language is extremely reductive. It is needed to move to a more reliable IDEs, MU (easier) and Yotta (a bit more complex). With Yotta it is possible to experiment and develop using mbed that works on micro:bit as well as a considerable range of other micro controllers (if I ma not wrong some Arduino boards are included too), all C/C++ based. With MU it is interesting for developing with micro-Python; also this development platform support micro:bit as well as some other IoT oriented devices

                  5 of 5 people found this helpful
                • Re: Language for IOT
                  shabaz

                  Hi, traveling so excuse typos typing on a small screen..

                  There's plenty of scope to learn and use multiple languages, or whatever you're familiar with, since the scope is broad. My favourites are C, C++ and JavaScript, but accepted that Python is important for some customers, so learning that too.

                  See an example non exhaustive scope here:

                  6 of 6 people found this helpful
                  • Re: Language for IOT
                    a531016

                    There are so many options, depending on hardware, platform and desired function.

                     

                    Do you have a project or hardware in mind or are you completely open to suggestions?

                      • Re: Language for IOT
                        nirmal2000

                        Ya, I am studying electronics engineering. and my interests in IOT developing. What would you suggest.

                          • Re: Language for IOT
                            Jan Cumps

                            C is your best bet when looking for a job as embedded engineer after your studies.

                              • Re: Language for IOT
                                jomoenginer

                                The recent Embedded/Firmware interviews I have been involved with have been mostly focused on C++; specifically C++11 and C++14.

                                • Re: Language for IOT
                                  james.flynn

                                  I would second that.  C is a foundation language for a lot of technology.  Yes, you may end up in Python or some other language, but the foundation you get from C will help you to quickly pickup other languages/skill.  Once you know C, it is easier to grow into to C++, .Net, and others.

                                  2 of 2 people found this helpful
                                    • Re: Language for IOT
                                      jomoenginer

                                      Actually the idea that learning C will assist in learning C++ is a myth that has been carried over from long ago.  The two languages have enough differences that learning C may hampers one move to C++.  These days, learning Python before C++ would be an easier path to C++.   

                                       

                                      However, to focus on C is to just focus on the Thing in IoT, which C certainly dominates; at least for the time being

                                       

                                      From most of the surveys I have seen, Java tops as the most popular Language used in IoT projects.  C comes in second since there are more things in the Internet of Things and is still the dominate language used.   The thing I do not know is if these surveys cover folks actually working on shippable IoT products or just anyone interest in IoT that has an Arduino on their dinner table. 

                                      2 of 2 people found this helpful
                                        • Re: Language for IOT
                                          james.flynn

                                          Jon, thanks for that clarification and for highlighting my age LOL, I did find a good attribution that discusses this @ https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B.that being said, My experience is that most embedded solutions are developed in C (but I've also used c++ and assembly when necessary) so I'm not saying that Python or Java isn't used, I've just not seen or experienced it myself.  That is interesting about C vs. C++ though.

                                            • Re: Language for IOT
                                              jomoenginer

                                              I don't believe I mentioned anything about your age. There are folks in Universities that promote the same C /  C++ myths thus new grads continue down the same path.

                                               

                                              But again, you are focusing on the Thing with regards to the use of C in IoT.  IoT is more than just the Thing.   My point is that there are a number of other languages are used in the IoT stack where the use of C is not an option; or is not an easy option.  And when you say Embedded, I suspect you mean Bare Metal Embedded.  However, there are the so called Embedded OS devices that use operating systems such as Linux and some sort of Windows flavor where something like Java might be a solution as well.

                                              2 of 2 people found this helpful
                                            • Re: Language for IOT
                                              BigG

                                              I have always reasoned to myself, so I am now curious to know if I am wrong, that the reason Java tops as the most popular language for IoT is that it includes mobile app developers as well as those working on the backend (cloud) server side, rather than on those developers working at the device level.

                                    • Re: Language for IOT
                                      peteroakes

                                      Though not a language, I would also suggest learning the following

                                       

                                      Node-Red, Open Source excelent flow based graphical design tool that easily can be used to implement gateways, IOT control logic etc. It runs on a PI or pretty much any other SBC or PC running Java / NodeJS. https://nodered.org/

                                       

                                      MQTT, a open source communications broker very popular in the SBC field, runs on almost every platform out there, it implements the Publish / Subscribe paradime and acts as the broker in the middle https://mosquitto.org/ . you can get clients for everything including Arduinos, ESP8266, PC, Linux, etc.

                                       

                                      OPCUA https://www.youtube.com/watch?v=-tDGzwsBokY    https://opcfoundation.org/about/opc-technologies/opc-ua/  

                                       

                                      I have and do use these all the time with my projects and there easy to use and very powerful.

                                      2 of 2 people found this helpful
                                      • Re: Language for IOT
                                        jomoenginer

                                        This is an interesting topic since IoT is a very relative term.

                                         

                                        As far as which language is best, IMHO,  it really depends on what part of the stack your are looking at.  At a lower level, closer to the metal, C and more recently C++ would be best as well as some sort of RTOS like FreeRTOS. But the further up the stack you get, you could be looking at Javascript, Python, Rust and even Flask on an OS like Linux or Windows 10 IoT.

                                         

                                        Michael Barr put out an interesting post a few months back titled "The Rise of the Full Stack Developers" based an observation he made regarding the skill folks list on their LinkedIn page.  Myself have seen Firmware positions that listed Javascript, Python and even Go as a requirement for the position.

                                        https://embeddedgurus.com/barr-code/2018/05/the-rise-of-the-full-stack-developers/

                                         

                                        I would not pigeon hole myself into a single language and rather learn how to use multiple in a connected manner.

                                        1 of 1 people found this helpful
                                          • Re: Language for IOT
                                            Jan Cumps

                                            jomoenginer , yes. And it's mainly the capacity of the controller/processor and resources - and the energy needs in some cases - that determine the language options.

                                            unlimited processor umph, unlimited power, no energy restrictions (there are IOT devices that are tied to the power grid and have the resources of a decent server): any language can be used.

                                            When you step down from that, the language options get narrower.

                                            1 of 1 people found this helpful
                                              • Re: Language for IOT
                                                jomoenginer

                                                My point was more inline to understanding the full stack of an IoT deployment. Smaller memory and processor constrained devices will have their limitations, but getting that data from the sensor to a database, or web browser or even something like AWS or Azure takes multiple layers and different development environments.  Looking at a good middle ground, Python is a language that fits nicely in the middle and is often used as the glue to get that sensor data to the cloud. 

                                                 

                                                Sorry, but the thought of an an IoT device tied to a power grid seems like something just waiting for trouble.