Preloader image

Understanding Arduino Syntax: Arduino Course for Absolute Beginners

The coding language that Arduino uses is very much like C++ (“see plus plus”), which is a rather common language in the world of computing. As I have alluded to in previous lessons, the code you learn to write for your Arduino will be very similar to code you write in any other computer language – all the basic concepts remain the same – it’s just a matter of learning a new dialect should you pursue other ventures.


The code you will be writing is called “human readable”, that is, it will make sense to you (sometimes) and will be organized for a human to follow. Part of the job of the IDE is to take the human readable code and translate it into machine-readable code to be executed by the Arduino. This process is called compiling.


The process of compiling is seamless to the user. All you have to do is press a button. If you have some errors in your computer code, the compiler will display an error message at the bottom of the IDE and highlight the line of code that seems to be the issue. The error message is meant to help you identify what you might have done wrong – sometimes they are very explicit, like saying, “Hey – you forget a semi-colon”, some times they are way out there.


Why would I be concerned with a semi colon you ask? A semi-colon is part of the Arduino languages syntax, the rules that govern how the code is written. It is sort of like grammar when you think of writing. Say for example we didn’t use periods when we wrote – every one would have a heck of a time trying to figure out when sentences ended and started. Or if we didn’t employ the comma, how would we convey a dramatic pause to the reader?


And let me tell you, if you ever had an English teacher with an overactive red pen, the complier is 10 times worse. In fact – your programs WILL NOT compile without perfect syntax. This might drive you crazy at first because it is very natural to forget syntax, but as you program more you will to learn to be assiduous with coding grammar.


Share this post on the following platforms easily:

No Comments

Post A Comment

error: Context Menu disabled!