3rd ASSIGNMENT OF IOT USING RASPBERRY PI
Submission By: Arun Rawat
CRN : 2117017
URN : 2104368
Submission To: Dr. Navneet Kaur
Ques 1: How is ThingSpeak useful for IoT applications?
Ans. ThingSpeak is an open-source IoT platform that enables users to collect, store,
analyze, visualize, and act on data from sensors or devices in real-time. It is particularly
useful in IoT applications for the following reasons:
• Real-time Data Collection: ThingSpeak allows IoT devices to send data to the
cloud instantly, enabling real-time monitoring and control.
• Data Visualization: It provides built-in support for charts and graphs that help
visualize sensor data over time, making it easier to interpret.
• MATLAB Integration: Users can perform advanced analysis using MATLAB
directly within ThingSpeak.
• APIs for Communication: RESTful and MQTT APIs are supported for
deviceto-cloud communication.
• Triggering Actions: ThingSpeak can trigger actions such as sending emails,
tweets, or HTTP requests based on data conditions.
• Free and Easy to Use: It is free for non-commercial use and easy to set up for
students and hobbyists.
Screenshot of ThingSpeak interface:
FIG 1.1 INTERFACING BETWEEN SENSOR AND THINGSPEAK
FIG- 1.2 CREATING CHANNEL FIG-1.3 COPY API KEY
FIG-1.4 MATLAB ANALYSIS GRAPH FIG 1.5 MATLAB INPUT CODE
FIG-1.6 MATLAB ANALYSIS & MATLAB VISUALIZATION OUTPUT
Ques 2: Explain the role of Node-RED in IoT.
Ans. Node-RED is a powerful, open-source tool used in the Internet of Things (IoT) to
connect devices, services, and data in a visual way. It allows users to create applications by
simply dragging and connecting blocks (called nodes) in a browser-based interface —
without writing complex code.
Key Roles of Node-RED in IoT:
1. Visual Programming Interface:
Node-RED provides a flow-based editor where users can build data flows using
simple drag-and-drop. This makes IoT development faster and easier, especially
for beginners.
2. Device Connectivity:
It supports various communication protocols like MQTT, HTTP, WebSocket, and
Serial, allowing it to connect with hardware devices (e.g., Arduino, ESP32,
Raspberry Pi).
3. Real-time Data Processing:
Node-RED can receive data from sensors and immediately process it — for
example, filter data, perform calculations, or trigger alerts based on certain
conditions.
4. Integration with Cloud Services:
It can connect IoT devices to platforms like ThingSpeak, Firebase, IBM Watson, or
even Google Sheets, making it easier to store and analyze data.
5. Dashboard Creation:
Node-RED has built-in nodes to create dashboards with charts, buttons, and gauges
for monitoring and controlling IoT systems in real-time.
6. Automation and Control:
It can be used to automate tasks — like turning on a fan when temperature is high,
or sending a notification if gas levels exceed a limit.
FIG: 2.1 Screenshot of Node-RED inter face