Arduino is an open-source electronics board used to make various projects. Arduino boards are able to read inputs like pressing of a button and signals given by a number of sensors and turn it into an output like turning on an LED, starting a motor and a lot more.
Arduino comprises of both the hardware part – the Arduino Board and the software part – the Arduino IDE. The Arduino platform has become quite popular with people just starting out with electronics, and for good reason.
Arduino does not need a separate piece of hardware (called a programmer) in order to load new code onto the board – you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program.
The Arduino Board
Understanding the Board
Power: The arduino board requires power supply to work. When connected to computer, the board gets power from it through the USB cable from Jack-1. When disconnected can be powered through barrel Jack-2. The recommended voltage for the arduino board is 6-12 volts.
Pins: The pins on the arduino board are the places where you connect your wires to construct a circuit.
GND Pin: The pins labelled 3 are gnd pins. They are used to ground your circuit.
5V Pin: The pin labelled 4 is the 5V pin. It supplies the 5 volt power from the board.
Digital Pins: The pins which read and send digital signals (0 or 1) are called the digital pins. Pins labelled as 0 to 13 are Digital pins.
PWM Pins: PWM stands for Pulse Width Modulation. The pins that are marked with (~) sign are pwm pins. They are normal digital pins but are capable of giving analog outputs by pwm.
Analog In Pins: Pins from A0 to A5 are analog input pins. They are capable of reading analog inputs from a number of sensors.
Reset Button: The button labelled 10 is the reset button. As the name suggests, this button restart the code loaded to arduino.
Power LED: The LED labelled as 11 is the power led. This LED lights up when the arduino board is connected to a power source.
TX and RX LED: TX is short for transmit and RX is short for recieve. LEDs labelled as 12 are RX and TX LEDs. TX led lights up when arduino board is transmitting data while RX led lights up when the board is receiving data.
Main IC: The component labelled as 13 is the Main IC or the Integrated Circuit. This is also referred to as the brain of the board. This is responsible for all the processing and controlling the board.
The Arduino IDE
The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software.
This software can be used with any Arduino board.
The very basic program for Arduino comprises of two functions. The setup() and the loop().
Things to be done for once are written in the setup() and the tasks that are to be performed repeatedly are written in the loop().