Arduino Programming Fundamentals
You are here! Micro-controllers are here! Arduino Uno is here!😎 Of course, we can’t discuss micro-controller projects without mentioning Arduino programming. There is no doubt a countless number of Arduino projects on the web today. Oh YES! Their impact is enormous, scarily even.
From the simple blinking of an LED to more sophisticated projects, Arduino can boast of its existence and its gradual domination of hobbyist projects as well as general-purpose control systems. I don’t think or perhaps I can’t imagine Arduino’s contribution to IOT (internet of things) can be written overnight. With Arduino projects in mind, we have got billions of work and experiments to do. There is also another tiny version of the Arduino board called the pro mini. You may also check it out; you will like it.
Please note that even though I have drafted this content around Arduino Uno, it is also applicable to other types of Arduino development boards. (Arduino Nano, Arduino Pico, Arduino Mega, etc.)
Arduino Programming: What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware and software. They are able to directly read inputs such as a light on a sensor, or a finger on a button, or read messages from Twitter and turn them into an output such as turning on an LED, activating a motor, or publishing something online.
You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
A worldwide community of engineers, makers, and developers consisting of students, hobbyists, artists, programmers, and professionals have gathered around
Arduino Uno Programming: Where from Arduino?
Arduino was first discovered at the IIDI (Ivrea Interaction Design Institute) as a pretty easy and user-friendly tool for fast and cost-effective microcontroller hardware-based simulation and implementation, aimed at learners who are beginners in programming and electronics.
All Arduino boards (Arduino Uno, pico, Nano, Mega, etc.) are completely open-source, which allows users to build any circuit on their own and then modify them to their particular needs. The Arduino software, too, is open-source and is constantly rising up through the contributions of enthusiasts and makers worldwide.
Arduino Uno Programming: Why Arduino?
Arduino has been used in thousands of different projects and applications. This is due to its simplicity and ease of usage. Likewise, the Arduino software is also easy-to-use for beginners and provides express tools for advanced users as well.
Moreover, when it comes to learning new things with little effort, Arduino surpasses most (if not all) of the development boards out there. You may also like this post Getting Started with LoRa RYLR998 and Arduino. It will help build wireless projects around Arduino.
Believe me or not, unlike other embedded system designs, you can learn Arduino with no prior knowledge of programming. In fact, Anyone, children, ladies, men, programmers even drivers can start tinkering and building Arduino projects by just following the step-by-step instructions of a kit (Arduino development board with sensor packs).
You can also follow along by just reading and sharing ideas online with other experienced members (or perhaps a novice who has already done with a particular Arduino project and has acquired a little experience with that) of the Arduino community.
Arduino gets rid of the complicated details of microcontroller programming and uses a simple easy-to-use package and libraries which offer some advantages and flexibility for students, makers, hobbyists, and professionals alike.
I have personally compiled below Some regular trump cards Arduino has over other microcontroller boards
- Cost-Effective: The complete Arduino development board cost less than $10. This is a plus for beginners who want to learn microcontrollers without sacrificing their pockets.
- Cross-platform: You don’t have to worry about the type of computer to use for writing your codes. Thanks to the software developers, the Arduino Software IDE (Integrated Development Environment) runs on all operating systems. Whether you are a Windows, Linux, or Mac OS lover, you got to choose your prefer installation package.
- Simple IDE: The Arduino Software IDE ( Integrated Development Environment ) is easy-to-use. Whether you are a beginner, intermediate, or advanced user, you will find the Arduino IDE very attractive, clear, and easy to go with.
- Open-source Software: You don’t have to worry about software limitations because the Arduino software is published as an open-source tool that is freely available to everyone. If you are an experienced programmer, you can use this opportunity to modify it to your taste. Moreover, those who are good at C++ can expand their software functionalities by developing customized libraries to support countless sensors and modules.
- Open-source Hardware: Just like users can modify their own version of the Arduino software, those who are experienced in circuit design can also make their own version, and name it whatever they wish. They can also add more components to extend and improve its functionality without having to worry about legal suites.
Arduino Programming: Hardware Overview
Even though there are many different types and series of Arduino, the Arduino Uno is indisputably the most commonly used Arduino development board. To get started, you need to know the pinout of this microcontroller board.
The pinout is directly printed on the board as shown in the diagram above. This makes the board relatively easy to use.
- The board was designed by Arduino.cc in Italy. The site also hosts a community of makers and Arduino lovers who are always ready to assist you throughout your programming adventure.
- The heart and brain of this development board is the Atmega328 microcontroller which was initially developed by Atmel Corporation and later acquired by Microchip Technology.
- Arduino UNO has 20 input/output pins. It is input/output because the same pin can be used as an input or output based on the program written unto it.
- Among these 20 pins, there are 14 digital pins. The digital pins labeled 0 to 13 only accept and manipulate binary 0 and 1 or HIGH and LOW as in digital data and quantities in digital electronics.
- The remaining 6 pins are analog pins. The analog pins labeled A0 to A5 accept and manipulate variable signals such as audio, temperature, etc. These pins have analog-to-digital converters (ADC) to convert the input variables to their equivalent digital signal with which the processor can work.
- It also has 6 PWM pins which are used for Pulse Width Modulation.
- Arduino UNO supports the following communication protocols:
- Serial Protocol
- I2C Protocol
- Serial Peripheral Interface (SPI) Protocol
So, these digital and analog pins are capable of multiple functions which depend on the project’s requirement. SPI Pins are used for connecting SPI modules and Serial Pins are also required to interface Serial modules (like GSM or GPS breakout boards).
However, We can also assign any pin to be used for serial communication using the software serial.
Also, check these recommended posts.
Arduino Memory Features
Memory capacity is a very important factor to consider when selecting a microcontroller for your project. If you have a bigger code or sketch to save then you should select a development board with more memory, the Arduino Mega is recommended.
Although the SD card option is always there but may compromise processing speed. That said, let’s have a look at Arduino Uno memory features:
- It has a flash memory of 32Kb.
- Arduino UNO has an SRAM of 2KB.
- EEPROM memory of UNO is 1Kb.
- The bootloader of 2Kb is installed so we are left with 30kb Flash memory.
Arduino UNO Applications
Arduino UNO has many applications in everyday life. It is the most widely used D-I-Y Microcontroller development board. Some of its working fields are:
- Embedded Systems
- Control Systems
- Condition Monitoring
I hope by now you have got the picture of what Arduino is and what they are used for. I must say this is just the tip of the iceberg and there’s a lot we can do with the Arduino board. If you are getting tired, let’s take a break and resume in the next part (part 2). Use the comment box to ask any question.
If you are a fan of Raspberry Pi, don’t miss this article in which I highlighted the main difference between Arduino and Raspberry Pi. It also discussed which of the development board is the right pick for your next project.
If this post or any other content on this blog has helped you, you can appreciate our effort by