blogs

Arduino Basics

2022-Jun-17

Introduction:

Arduino is an open source hardware and software platform. One can design and manufacture various interactive electronics projects, be at a small prototype or at a larger scale. Arduino is one of the basic components that is used in most of the robotics and electronic related projects. 


In General, arduino can be understood as the brain or the processor of any kind of electronic projects which we build. With the vast flexibility that arduino provides, it has gained its popularity all over the world by now. Makers, hobbyists, students, programmers. etc. are the top users for this platform. Being an open source, arduino has established itself as an incredible platform where one can have access to vast amounts of information and projects from the experts themselves.


Arduino acts like the motherboard of a computer. Here a set of instructions/inputs are received via different sensors connected to the arduino. They are later processed according to the code written specifically for the arduino itself (written in Arduino Programming Language). Then further output signals are then forwarded by the arduino to the desired actuators where the actual work is done. 


Pins and ports in Arduino:

Input to the arduino is provided through the various pins that are available in the arduino board (Pin numbers vary based on the board used which may be UNO, Nano or Mega). These different pins are distinguished as Analog pins and Digital pins based on the signal that they carry. Digital pins have further included a few PWM (Pulse Width Modulation) pins in it to enable wider use of the digital pins which we shall discuss further. Digital pins take input from various sensors in the form of 0s and 1s only while the Analog pins take input from the sensors in multiple integer values ranging from 0 to 1023. These integer values specify potential values from 0v to 3.3v or 5v.


Along with that Arduino is further provided with two external ports where one of the port is for giving an input voltage of 3.3v/5v through power jack while the other port is a USB 2.0A or USB 2.0 Mini B port in order to serially connect arduino with the computer to upload the codes or send Serial data.


Processor in Arduino:

The processing part in the arduino is done by the Microcontroller embedded in the arduino that receives and sends signals based on the instructions provided.  The programming is done in the Arduino Software namely Arduino IDE. The language is similar to C and C++ language with further additional keywords specifically for arduino programs only. The codes written in this language are saved with the extension ‘.ino’. Programming in this language can be discussed further in the upcoming sections with detailed breakdown of each line. The microcontrollers used in Arduino UNO, Nano and Mega are the ATMega328P, ATMega328 and ATMega2560 respectively. 


Output through Arduino:

The Output from the arduino can also be received from the available pins in the arduino where most of the outputs are taken digitally through the digital pins in the form of 0s and 1s while analog output can be taken from analog pins from integer range of 0 to 255 value with potential ranging from 0v to 3.3v/5v. The schematic pin diagram of different arduino can be understood from these images provided.