0% found this document useful (0 votes)
18 views

IoT_UNIT-IV_Lecture_Notes

Uploaded by

Vishal Goud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

IoT_UNIT-IV_Lecture_Notes

Uploaded by

Vishal Goud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT-IV

IoT PHYSICAL DEVICES and END POINTS

IoT device:

IoT can be any object that has a unique identifier and which can send and receive data (including user data) over a
network(e.g., smart phone, smart TV, refrigetor,etc.). IoT devices are connected to the internet and send information
about themselves or about surroundings or allow actuation upon the physical entities/environment around them
remotely.

Basic building blocks of IoT

Sensing: Sensors can be either on-board the IoT device or attached sensors such as temperature, humidity, etc. The
sensed information can be communicated either to other devices or cloud-based servers/storage.

Actuation: IoT devices can have various types of actuators attached that allow taking actions upon the physical entities
in the vinicity of the device.

Communication: Communication modules are responsible for sending collected data to other devices or cloud-based
servers/storage and receiving data from other devices and commands from remote applications.

Analysis & Processing: Analysis & Processing modules are responsible for making sense of the collected data.

Introduction to raspberry Pi

Raspberry Pi is a low-cost mini-computer with the physical size of credit card. Raspberry Pi runs on various flavors of
linux and can perform almost all tasks that a normal desktop can do.

Peripherals of Raspberry Pi board

Processor & RAM: Raspberry Pi is based on Broadcom BCM with 1 GB RAM

USB ports: Raspberry Pi comes with 4 USB ports. The USB ports on Raspberry Pi can provide a current upto 100mA.

Ethernet ports: Raspberry Pi comes with a standard RJ 45 ethernet port.

HDMI output: The HDMI port on Raspberry Pi provides both video and audio output. You can connect the Raspberry Pi
to a monitor using HDMI cable.

Video port: Raspberry Pi comes with a video output with an RCA jack.

Audio output: Raspberry Pi has a 3.5mm audio output jack.

GPIO pins: Raspberry Pi comes with a 40 GPIO pins. There are four types of pins- True GPIO pins, I2C interface pins, SPI
pins and Serial Rx and Tx pins.

Display Serial Interface(DSI): The DSI interface can be used to connect an LCD panel to Raspberry Pi.

Camera Serial Interface(CSI): The CSI interface can be used to connect a camera module to Raspberry Pi.

Status LEDs: Raspberry Pi has 5 LEDs.


SD card slot: Raspberry Pi does not have a built in OS and storage. You can plug-in an SD card loaded with a linux image
to the SD card slot.

Power input: Raspberry Pi has a micro-USB connector for power input.

Linux on Raspberry Pi

Raspbian: Raspbian Linux is a Debian Wheezy port optimized. This is recommended linux for Raspberry Pi.

Arch: Arch is an Arch Linux port for AMD devices.

Pidora: Pidora linux is a fedora linux optimized for Raspberry Pi.

RaspBMC: RaspBCM is an XMBC meia-center distribution for Raspberry Pi.

OpenELEC: OpenELEC is a fast and user-friendly XBMC media-center distribution.

RISC OS: RISC OS is a very fast and compact OS.

Raspberry Pi Interfaces

Raspberry Pi has serial, SPI and I2C interfaces for data transfer

Serial: The serial interface o Raspberry Pi has receive(Rx) and Transmit(Tx) pins for communication.

SPI: Serial Peripheral Interface(SPI) is a synchronous serial data protocol used for communicating with one or more
peripheral devices. In an SPI connection, there is one master device and one or more peripheral devices. There are 5
pins on Raspberry Pi for SPI interface:

Master In Slave Out(MISO): Master line for sending data to the peripherals.

Master Out Slave In(MOSI): Slave line for sending data to the master.

SCK(Serial Clock): Clock generated by master to synchronize data transmission

CE0(Chip Enable 0): To enable or disable devices.

CE0(Chip Enable 1): To enable or disable devices.

I2C: The I2C interface pins on Raspberry Pi you can connect hardware modules.I2C interface allows synchronous data
transfer with just pins- SDA(data line) and SCL(clock line).

Programming raspberry pi with python

Controlling LED with Raspberry Pi


Interfacing an LED and switch with Raspberry Pi

In this example, the LED is connected to GPIO pin 18 and switch is connected to pin 25. In the infinite loop the value of
pin 25 is checked and state of LED is toggled if the switch is pressed.

Cont…
Python program for sendin email on switch press

Cont…
Interfacing a Light Sensor(LDR) with raspberry pi

In this example, the readLDR() function returns a count which is proportional to light level. In this function the LDR pin is
set to o/p and low and then to i/p. At this point capacitor starts charging through the resistor (and a counter is started)
until the i/p pin reads high. The counter is stopped when i/p reads high.

Cont…

You might also like