Iot Day Eight
Iot Day Eight
and
allows users to write programs for Arduino using C or C++. Arduino IDE makes it easy for you to write code and
upload it on your Arduino board.
Advantages of Arduino
It is an open-source platform.
Easy to use and perfect for beginners. There are wide varieties of libraries, examples, and projects available
online that are pre-coded for you to learn and build using Arduino, allowing beginners to get started very
easily.
It has a large community of people using and troubleshooting it. This makes it easy to help in debugging
projects.
It comes with an open-source software system feature that allows advanced developers to merge Arduino
code with existing programming libraries, which can be extended and modified.
Arduino IDE is also cross-platform, meaning it can run on Windows, macOS, and Linux — unlike other
microcontroller systems that may only run on Windows.
The biggest advantage of Arduino is its ready-to-use structure. Arduino comes in a complete package form
that includes:
5V regulator
A burner
An oscillator
A microcontroller
Serial communication interface
LED
Header pins
Arduino also has many low-cost board variations and peripherals to choose from depending on your
project needs.
Disadvantages of Arduino
Requires effort to accomplish some tasks such as scheduling and database storage.
If more processing power or working memory is needed, one may need to switch from the Arduino
environment.
There are many electronic boards out there. An Arduino is based on a microcontroller, which is a simple, easy-to-
use computer designed for beginners to run one program at a time repeatedly.
If your task involves simple, repetitive operations like:
Reading the weather
Opening a door
Driving a simple robot
Turning on an LED
There are many variations from official Arduino boards including Arduino Uno, Arduino Mega, Arduino Leonardo,
Arduino Micro and many more to Arduino compatible boards each with different capabilities. Each board has its
own features and was built to suit different level of applications.
Arduino Uno
The Arduino Uno (Figure 4.1) is one kind of microcontroller board based on ATmega328, and Uno is an Italian
term meaning "one". The ATmega328 is one kind of single-chip microcontroller formed with the mega-AVR
family. The architecture of the Arduino Uno is a customized Harvard architecture with an 8-bit RISC processor
core.
SRAM: 2 KB
Clock Speed: 16 MHz, which is fast enough for most applications and does not slow down the
microcontroller.
USB Interface:
An easy USB interface allows interaction with USB, functioning like a serial device. Used to load a program from
the Arduino IDE onto the Arduino board. Also used to power the board. The USB interface chip converts USB-level
signals to a level the Arduino Uno can understand.
USB Connection
AC to DC Adapter
Battery Pack
Battery leads to the Vin pin and GND pin of the Power Connector
Recommended Voltage:
For most Arduino models, it is between 6V and 12V. Using voltage beyond this range may damage the board.
Input and Output (I/O) Pins
The pins on your Arduino Uno are the points where you connect wires to construct a circuit. The Arduino board
provides several types of pins; each designed for specific functions. These pins are labelled on the board (as
shown in Figure 4.2) and divided mainly into digital and analogue pins.
Digital and Analog Pins:
Arduino Uno provides 14 I/O pins, including:
o Digital Pins (2–13)
o TX (1) and RX (0) for serial communication
o Analog Input Pins (A0 to A5)
These pins can act as input or output under software control using functions like:
o pinMode()
o digitalWrite()
o digitalRead()
Digital pins can:
o Detect digital input (e.g., if a button is pressed)
o Provide digital output (e.g., to power an LED)
Analog pins:
o Can read signals from analogue sensors (such as temperature sensors)
o Convert them into digital values using ADC (Analog to Digital Converter)
Operating Voltage:
All I/O pins function at 5 volts.
The Arduino UNO board has 14 digital I/O pins, out of which 6 provide
PWM (Pulse Width Modulation) output.
GND (Ground):
GND stands for Ground.
The Arduino board provides multiple GND pins, any of which can be used to complete an electrical circuit
by grounding it.
Serial Pins:
Certain pins have special communication functions.
Pins 0 (RX) and 1 (TX) serve for serial communication: