Arduino Uno
Arduino Uno
Introduction
What’s on Board?
Arduino uno is a microcontroller board based on 8-bit ATmega328P microcontroller.
Along with that ,it consists other components such as crystal oscillator ,serial
communication ,voltage regulator ,etc ,to support the microcontroller.
The 14 digital input/output pins can be used as input or output pins by using
pinMode(),digital Read() and digitalWrite() functions in arduino programming.Each
pin operate at 5v and can provide or receive a maximum of 40mA current, and has an
internal pull-up resistor of 20-50k ohms which are disconnected by default .Out of
these 14 pins,some have specific functions as listed below:
Serial Pins 0(RX) and 1(TX): Rx and Tx pins are used to receive and
transmit TTL serial data.They are connected with the corresponding ATmega328P
USB to TTL serial chip.
In-built LED Pin 13: This pin is connected with an built-in LED, when pin
13 is HIGH - LED is on, and when pin 13 is LOW ,its off.
Voltage Regulator:The voltage regulator is not actually something you can (or
should) interact with on the Arduino. But it is potentially useful to know that it is
there and what it’s for. The voltage regulator does exactly what it says – it controls
the amount of voltage that is let into the Arduino board. Think of it as a kind of
gatekeeper; it will turn away an extra voltage that might harm the circuit. Of course, it
has its limits, so don’t hook up your Arduino to anything greater than 20 volts.
Communication
Arduino Software
Arduino Programming
When using the Arduino , there are two functions that are absolutely needed, a
“void setup ()”, and a “void loop ()”. Setup is called only once at the beginning of the
program, and is used initialize variables and hardware needed for the main routine,
“loop”. Loop runs continuously until the power is cut, and is where you want to place
your logic.
A very simple program that gives an example of this by setting up the Arduino
and making the LED blink is shown below:
//the setup function runs once when you press reset or power the board
void setup() {
//initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUITIN, OUTPUT);
}