Saturday, August 3, 2019

Meet the Arduino

Meet the Arduino

Ah the Arduino! This simple design has revolutionized the electronics hobbyist market and turned these hobbyist into "makers". Simple to use and easy to program, what more can you ask for from a development platform. Well allot actually but we will get to that later. So what is an Arduino? Is it an electronics board? Is it a programming language? Is it integrated development environment? Well it's all of the above actually. The board you normally see as "the Arduino board" is actually one of their boards called the Arduino Uno and the IDE is custom designed open source programming environment.

The Arduino developers designed Arduino as a learning platform for their college students to learn how to design embedded systems and get started in programming microcontrollers. Due to the popularity of the new platform, they decided to release it to the rest of the world and the rest is history after that. For a more detailed description of the history of the Arduino platform, check out their Wikipedia site here.

So how does Arduino work? Well lets focus this on the Uno, the Uno is actually a single board computer with an Atmel ATMEGA328P microcontroller installed with custom designed USB to TTL converter built in. This is the hardware interface for connecting the Uno to your PC. The microcontroller has a bootloader (we will come back to this) installed in it when you receive your Uno board. The bootloader is a small program located in a section of memory on the microcontroller and is designed to receive the information coming in on the serial port and moves that information to the flash memory portion of the microcontroller. This information that is moved to the flash portion of the microcontroller is the program that you write.

The IDE is a compiler, linker and programmer all-in-one program that helps you to compile and upload your code into the microcontroller. So when you are finished writing your code, you press the upload button on the IDE, the IDE will compile your program and upload it to the microcontroller. The program will then run on the microcontroller automatically! That is one reason why the Arduino is so popular because it is that easy to use.

Other microcontroller companies have complicated IDE's and tools that take up allot of space and require patching your compiler, linker, programmer and etc. Also they charge for their compilers or give you a limited free version where you are limited to the code size you are allowed to compile. Arduino IDE is completely free! All you pay for is the board however with a little bit of knowledge, you can make your own Uno board very easily and cheaply.

 So all of this sounds good but there has to be a catch somewhere. Well there is and that is the debugger, it simply doesn't have one. However it does have a serial terminal that can be used to display messages to you. For example, you can have it print a line every time it performs a function. In more complicated IDE's, you have direct access to the memory locations and can stop the program at almost any point in the code space. So if you have a problem, you can find it allot faster than you can by using the terminal alone. That being said, I have been using Arduino in my designs for over 10 years now and I have only ran into one time where I couldn't use the terminal for troubleshooting.

If you are looking to get into the embedded world of development, Arduino is a great way to get started. It's cheap and because its open source, there is a massive community of developers who can help you when you need it.



Most Viewed Post