What Is Arduino?
Arduino is an open source programmable circuit board that use a microcontroller chip and many other electronic components that are needed for the microcontroller to function or to extend microcontrollers capabilities.
A typical microcontroller includes a processor, memory and input/output (I/O) peripherals on a single chip. Sometimes referred to as an embedded controller or microcontroller unit (MCU), microcontrollers are found in vehicles, robots, medical devices, vending machines and home appliances, among other devices.
While all Arduino boards differ from each other, there are several key components that can be found on practically any Arduino board.
1. Microcontroller - this is the brain of an Arduino, and is the component that we load programs into. Think of it as a tiny computer, designed to execute only a specific number of things.
2. Digital pins - pins that use digital logic (0,1 or LOW/HIGH).
3. Analog pins - pins that can read analog values in a 10 bit resolution (0-1023).
4. 5V / 3.3V pins- these pins are used to power external components.
5. GND - also known as ground
6. VIN - stands for Voltage In, where user can connect external power supplies.
some Arduino board comes with
1. USB port - used to connect your Arduino board to a computer.
2. USB to Serial chip - the USB to Serial is an important component, as it helps translating data that comes from e.g. a computer to the on-board microcontroller. This is what makes it possible to program the Arduino board from your computer.
Basic Operation
Most Arduino boards are designed to have a single program running on the microcontroller. This program can be designed to perform one single action, such as blinking an LED or it can also be designed to execute hundreds of actions like read sensor and control motors.
User can write code in the Arduino software to tell the microcontroller what to do. For example, by writing a line of code, user can turn ON or OFF light-emitting diode (LED). If user connect a push button and add another line of code to turn the LED ON only when the button is pressed. User can also write program to tell the LED to blink only when the push button is held down.
The program that is loaded to the microcontroller will start execution as soon as it is powered. Every program has a function called "loop". Inside the loop function, user can for example, Read a sensor and turn on or off a LED based on sensor value.
Circuit Basics
Circuits consist of at least one active electronic component connected the Arduino
A simple LED circuit example - an LED with a resistor (to protect the current flow from LED) is connected to Arduino board pin using wire and another end of the LED is connected to the ground. When the pin is set to a HIGH state through program then it will turns on the LED, and when the pin is set to a LOW state, the LED will turn off.
Sensor
A sensor, in simple terms, is used to sense its environment, and converts it into an electronic signal, for example
button sensor - when button is pressed then state changes and the electronic signal is switched from low to high (0 to 1).
temperature sensor - it sense the temperature and generate necessary electrical signal
Actuator
An actuator, in simple terms, is used to actuate or change a physical state. Some examples are:
Light (such as an LED)
Motor
Actuators converts electric signals into light or mechanical energy (movement).