IoT (15CS81) Module 5 Arduino Uno

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 30

IoT Physical

Devices and
Endpoints
15CS81 MODULE 5
Introduction to Arduino
What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware
and software.
to read inputs - light on a sensor, a finger on a button
you use the Arduino programming language (based on Wiring), and 
the Arduino Software (IDE), based on Processing.
Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments.
Arduino was born at the Ivrea Interaction Design Institute as an
easy tool for fast prototyping, aimed at students without a background in
electronics and programming.
Why Arduino?
The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs
on Mac, Windows, and Linux.
Inexpensive 
Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux
operating systems. Most microcontroller systems are limited to Windows.
Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners
Open source and extensible software - The Arduino software is published as open source tools,
available for extension by experienced programmers. 
Open source and extensible hardware - The plans of the Arduino boards are published under a
Creative Commons license, so experienced circuit designers can make their own version of the
module, extending it and improving it.
Types of boards
Arduino UNO
Install the Arduino Desktop IDE
To get step-by-step instructions select one of the following link accordingly to your operating system.

Windows Install the Arduino Desktop IDE


https://www.arduino.cc/en/Guide/Windows

Mac OS X
Linux
Portable IDE (Windows and Linux)
ChromeOS (Arduino Create Chrome App) 
Arduino programming
The structure of Arduino program is pretty simple. void loop ( )
Arduino programs have a minimum of 2 blocks,

Preparation & Execution


{

Each block has a set of statements enclosed in curly statement-1;


braces:
statement-n;
void setup( )

{ }

statements-1; Here, setup ( ) is the preparation block and


statement-n; loop ( ) is an execution block.
}
Programmi
ng cont.
The setup function is
the first to execute
when the program is
executed, and this
function is called only
once.
The setup function is
used to initialize the
pin modes and start
serial communication.
This function has to be
included even if there
are no statements to
execute.
void setup ( )

pinMode (LED, OUTPUT); //Declaring pin 13 as output pin

void loop( ) // The loop function runs again and again

digitalWrite (LED, HIGH); //Turn ON the LED

delay(1000); //Wait for 1sec

digitalRead (LED, LOW); // Turn off the LED

delay(1000); // Wait for 1sec

}
Raspberry Pi
Introduction

The Raspberry pi is a
series of credit card
sized single-board
computers developed
in the United Kingdom
by the Raspberry pi
Foundation to promote
the teaching of basic
computer science in
schools and developing
countries.
Introduction
Raspberry Pi is a small single board computer. By connecting peripherals like Keyboard, mouse,
display to the Raspberry Pi, it will act as a mini personal computer.
Raspberry Pi is popularly used for real time Image/Video Processing, IoT based applications
and Robotics applications.
Raspberry Pi is more than computer as it provides access to the on-chip hardware i.e. GPIOs for
developing an application. By accessing GPIO, we can connect devices like LED, motors, sensors,
etc and can control them too.
It has ARM based Broadcom Processor SoC along with on-chip GPU (Graphics Processing Unit).
The CPU speed of Raspberry Pi varies from 700 MHz to 1.2 GHz. Also, it has on-board SDRAM
that ranges from 256 MB to 1 GB.
Raspberry Pi also provides on-chip SPI, I2C and UART modules.
boards
Raspberry Pi 3 On-chip
Hardware
Hardware
HDMI (High-Definition Multimedia Interface): It is Composite Video and Audio Output: The
used for transmitting uncompressed video or digital composite Video and Audio output port
audio data to the Computer Monitor, Digital TV, etc. carries video along with audio signal to the
Generally, this HDMI port helps to connect Raspberry
Pi to the Digital television. Audio/Video systems.
CSI Camera Interface: CSI (Camera Serial Interface) Power LED: It is a RED colored LED which is
interface provides a connection in between Broadcom used for Power indication. This LED will turn
Processor and Pi camera. This interface provides ON when Power is connected to the Raspberry
electrical connections between two devices. Pi. It is connected to 5V directly and will start
DSI Display Interface: DSI (Display Serial Interface) blinking whenever the supply voltage drops
Display Interface is used for connecting LCD to the below 4.63V.
Raspberry Pi using 15-pin ribbon cable. DSI provides
fast High-resolution display interface specifically used ACT PWR: ACT PWR is Green LED which shows
for sending video data directly from GPU to the LCD the SD card activity.
display.
Raspberry Pi interfaces
Serial:
The serial interface on Raspberry Pi has receive(rx) and transmit(Tx) pins for communication
with serial peripherals. ™
SPI:
Serial Peripheral Interface(SPI) is a synchronous serial data protocol used for communicating
with one or more peripheral devices.
I2C:
The I2C interface pins on Raspberry Pi allow you to connect hardware modules. I2C interface
allows synchronous data transfer with just two pins-SDA(data line) and SCL(clock line).
Raspberry pi Operating Systems
https://www.raspberrypi.org/dow
nloads/
 DS18B20 TEMPERATURE SENSOR
https://www.circuitbasics.com/raspberry-pi-ds18b20-temperature-sensor-tutorial/
IoT for Smart Cities
Smart cities
UN predicts that by 2050,
the world’s urban population
is likely to double and reach
the point of nearly 6.7
million people
IoT has the potential to tame
the pressure of urbanization,
create new experience for
city residents, and make day-
to-day living more
comfortable and secure.
IoT use cases for smart
cities
Road traffic Smart parking
Smart cities ensure that their citizens get from With the help of GPS data from drivers’
point A to point B as safely and efficiently as smartphones (or road-surface sensors
possible. embedded in the ground on parking spots),
smart parking solutions determine whether
To achieve this, municipalities turn to  the parking spots are occupied or available
IoT development and implement smart traffic and create a real-time parking map.
solutions.
When the closest parking spot becomes free,
drivers receive a notification and use the map
on their phone to find a parking spot faster
and easier instead of blindly driving around.
IoT use cases for smart
cities
Public transport
The data from IoT sensors can help to reveal patterns of how citizens use transport.
Public transportation operators can use this data to enhance traveling experience, achieve a higher
level of safety and punctuality.
To carry out a more sophisticated analysis, smart public transport solutions can combine multiple
sources, such as ticket sales and traffic information.
IoT use cases for smart
cities
Utilities
IoT-equipped smart cities allow citizens to save money by giving them more control over their home
utilities. IoT enables different approaches to smart utilities:
Smart meters & billing
With a network of smart meters, municipalities can provide citizens with cost-effective connectivity to
utilities companies’ IT systems.
Now, smart connected meters can send data directly to a public utility over a telecom network, providing it
with reliable meter readings.
Smart metering allows utilities companies to bill accurately for the amount of water, energy and gas
consumed by each household.
Revealing consumption patterns
IoT use cases for smart
cities
Street lighting
IoT-based smart cities make maintenance and control of street lamps more straightforward and cost-
effective. Equipping streetlights with sensors and connecting them to a cloud management solution
helps to adapt lighting schedule to the lighting zone.

Waste management
Most waste collection operators empty containers according to predefined schedules. This is not a very
efficient approach since it leads to the unproductive use of waste containers and unnecessary fuel
consumption by waste collecting trucks.
Environment
Public Safety

You might also like