on advanced technology, there is a long library for almost every sensor available in the market.
Thus, we will have a readymade library for SDS011 that utilizes a Software Serial library and
seamlessly for Arduino Uno. However, ESP32 does not work with Software Serial. It consists
of three UART ports and uses Hardware Serial to connect to UART devices. We will be using
the existing library and commands with hardware-serial to receive PM data from the installed
sensors. The commands will be stored in processdata.file.
The SDS011 has a sleep current of 2mA. This sensor works even on sleep mode quite
infrequently. Sleep commands will be stored in processdata.h file for you to explore. However,
GPIO13 is utilized to switch on the NPN transistor (2N2219) to hold SDS011 on during its active
stage, before it could possibly turn into a power-o mode.
Once everything is done to this point, now it’s time to upload the code to ESP32. For this,
you will need to assemble devices on the PCB or to the general purpose Vero board. Then
connect the USB power supply to the ESP32 module. Start Arduino IDE to add the library for
ESP32 and other important libraries. Then you will need to open the Arduino Code to change/
provide Wi-Fi ID and Password for the initial setup. Now replace the ThinkSpeak channel
number with your own channel number. Then you will need to select the ESP32 Developers
module from the pull-down menu under tools option. Next is to select the right USB COM
port from the pull-down menu. Lastly, press upload. If you have installed everything right at its
place then the program will start communicating with the ESP32 board and then you will start
uploading the code into ESP32 MCU.
Once the process is complete you should see PM2.5, PM10 and other important data on the
TFT screen. The same data will be replicated on the serial monitor of Arduino.
PROJECT 4: SMART CAMERA BASED ON IoT BY USING
ANDROID AND RASPBERRY PI
Introduction and Objectives
In the 21st century of digital world and internet, surveillance is very important to ensure security
and protection. No one wants a burglar or a trespasser roaming around their private property.
For this reason, we need a complete flexible surveillance solution that is easily accessible by the
user. In this project, we will be using the Raspberry Pi (RPi) to make a smart camera and then
watch its live video on a smartphone from anywhere. For this project, internet connectivity is
a must for both Raspberry Pi and the smartphone. By following the step by step guide you can
build your own remote security camera for surveillance.
Method and Approach
Hardware Needed for the Project
1. An Android smartphone (it must be 4.0 [ice-cream sandwich] or higher).
2. Raspberry Pi 2.
3. Raspberry Camera module.
4. A 5 volt, 1 Amp with micro-USB output (mostly used in smartphones).
5. USB audio adaptor (This is optional only if you need audio in your video feed).
6. USB Wi-Fi dongle (It must be compatible with Raspberry Pi 2).
356 Internet of Things
Internet_of_Things_CH14_pp349-372.indd 356 9/3/2019 10:17:35 AM
Software
We will be using the Butterfly TV app for this project. Thus, we can also call this project as
Butterfly PI since it’s using the RPi and Butterfly TV app. The highlighting features of the project:
1. You will be able to broadcast live video stream in different screen resolutions.
2. You can communicate with your audience via comments while you are broadcasting
your live video.
3. You can also share your live video with your friends on social media channels live
Facebook and Twitter. This makes it also a brilliant tool for social media.
4. The app/interface can be accessed through Facebook or Google+ sign up.
5. You have full control over your videos, you can watch/share/delete them at any moment.
Setting up the Smartphone for the Project
First, you will need to install the Butterfly TV from the Google Play store. This app will be well
integrated with your smartphone camera. Now just login to Butterfly TV and then click on My
Butterfly pls item on the menu options. Then click on the Add new Butterfly PI in the menu to
write your chosen camera as a new device and with security code. Later you will need to name
and code to authenticate your RPi.
Man
Shop
Car
Ice Crean
Bike
Man
Chapter 14 IoT Project Ideas 357
Internet_of_Things_CH14_pp349-372.indd 357 9/3/2019 10:17:35 AM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.140.108