What is the Arduino ??

 

What is the Arduino ??

intro

Arduino is an Open-source electronic prototyping device that is programable and used by people to control electronic projects and drive devices such as motors and sensors.

It comprises of 13 input digital pins with 6 (11, 10, 9, 6, 5, and 3) pin having the ability to perform PWM (pulse width modulation ~)

Types

The Arduino chips and boards come in different version each giving a different functionality and capabilities giving range from small projects to large and complex projects since the microcontrollers increase in performance and complexity. Here are some of the common types of Arduino.

  1. Arduino nano

The Arduino nano is the commonest board used among programmers since it is very small in size and not very bulky and have which makes it very advantages for projects like DIY drowns and it comprises of a small dc power jack.

  1. Micro

This is also one of the smallest boards and used more for HID and in virtual comm devices since it holds all the functionalities of the boards though it lucks a DC power input jack.

  1. Uno

This is the most common type of Arduino used in school and home projects, it has a large microcontroller and numerous input pins and its used to drive motors, light LEDs, sonic sensors etc.

The pins

Most of the Arduino boards come with a microcontroller chip that is connected to the 13 output pins where all the components are connected and this programmable chip makes it act like a minicomputer, on the board there are three types of pins i.e. digital, analog and power pins

·        Digital pins:

The pin in this sector mostly sends and receive digital signals just like the name suggests (1s and 0s) that is to say the pins are either in the HIGH state or in the LOW state.

The pins range from 0 to 13 with the pins 0(RX) and 1(TX) being the receive and transmit pins respectively these are main used when loading the program code to the chip.

The pins 2, 4, 7, 8, 12 and 13 these are purely digital and are only HIGH and LOW can not be in both states at the same time.

And the pins with the label ~ (3, 5, 6, 9, 10, 11) these pins can also be HIGH and LOW state but what makes them so catchy is that they support the Pulse-width modulation (PWM) meaning they can simulate analog signals by sending high pulses creating varying voltages and this use to control motor speed and brightness of an LED (Light Emitting Diode)

·        Analog pins:

There are six analog pins on the board ranging from A0 to A5 which are connected straight to the analog pins of the microcontroller chip, and these are mainly for reading variable (analog) signals from the environment such as the signals from a thermos sensor, potential meters etc.

·        Power pins:

There are 5 power pins on the board, and these are used for supplying the power to the component being driven or operated, the board can supply 3.3v but the maximum of 5v with 40mA of current that can be withdrawn from the pin.

Apart from the pins, the Arduino comes with 2 axillary power ports that supply the power required to drive the board. There is a USB port, this is used to plug the board to the computer and the DC port used to plug the board direct to DC power source.

·        Other pins:

These pins include the 2 ICSP (in-circuit serial programming) these are used for interconnecting other Arduino boards and most especially used to upgrade and upload the firmware of the microcontroller.

The programming of the board.

The Arduino board are also designed with a USB port, this is use to connect the board to the computer and then use the Arduino IDE (software) to program the microcontroller in C++ and the code is stored as a sketch, in the sketch there are two functions the loop () and the setup ()

·        The setup () function:

This is the inbuilt function that runs once to initialize the settings of the board and is used to define the functions of the pins set to a certain output or input, the pins can be initialized as either input or output by the function pinMode ();

·        The loop () function:

This function runs continuously until the program is shutdown or plugged off the power supply, this is the sector of the program where other logical functions and logics of the project being built is set and functions like digital Write is used for making digital pins either LOW or HIGH (ON or OFF). And analog Read and analog Write to read and write varying signals (analog signals) from the environments.

For example, for a blinking led project.

In The void setup () function is used to initialize the function of pin 4 by the pinMode() function telling the pin to be an output pin.

In the loop() function the digital Write(led, HIGH) and digital Write(led, LOW) is used to turn the pin ON or OFF which lights the LED(Light Emitting Diode).

The delay function is used to set a wait between the HIGH and OFF state of the LED making the LED turn ON then OFF after 100ms in a continuous loop which gives an impression of a blinking buld to the human eye.

Inconclusion the The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program with the GNU toolchain, also included with the IDE distribution.

 

 

 

 

 

Post a Comment

0 Comments