Activity No 3
Activity No 3
2
Transmitting Data over the Network
Course Code:CPE 101 Program:
Course Title: Internet of Things Date Performed:
Section: Date Submitted:
Name: Instructor:
1. Objective:
This activity aims to introduce the fundamental process of transmitting data from a NodeMCU device to a
desktop computer running a Python-based server.
2. Intended Learning Outcomes (ILOs):
After completion of this activity the students should be able to:
2.1 Configure and program the NodeMCU device using an Arduino IDE.
2.2 Develop an embedded source code that can capture data from a temperature sensor.
2.3 Implement a server that can display the readings on the desktop computer.
3. Discussion :
Wireless sensor network (WSN) refers to a group of spatially dispersed and dedicated sensors for
monitoring and recording the physical conditions of the environment and organizing the collected data at
a central location. WSNs measure environmental conditions like temperature, sound, pollution levels,
humidity, wind, and so on.
These are like wireless ad hoc networks in the sense that they rely on wireless connectivity and
spontaneous formation of networks so that sensor data can be transported wirelessly. WSNs are
spatially distributed autonomous sensors to monitor physical or environmental conditions, such as
temperature, sound, pressure, etc. and to cooperatively pass their data through the network to a main
location. The more modern networks are bi-directional, both collecting data from distributed sensors and
enabling control of sensor activity. The development of wireless sensor networks was motivated by
military applications such as battlefield surveillance; today such networks are used in many industrial
and consumer applications, such as industrial process monitoring and control, machine health
monitoring, and so on.
The WSN is built of "nodes" – from a few to several hundreds or even thousands, where each node is
connected to one (or sometimes several) sensors. Each such sensor network node has typically several
parts: a radio transceiver with an internal antenna or connection to an external antenna, a
microcontroller, an electronic circuit for interfacing with the sensors and an energy source, usually a
battery or an embedded form of energy harvesting. A sensor node might vary in size from that of a
shoebox down to the size of a grain of dust, although functioning "motes" of genuine microscopic
dimensions have yet to be created. The cost of sensor nodes is similarly variable, ranging from a few to
hundreds of dollars, depending on the complexity of the individual sensor nodes. Size and cost
constraints on sensor nodes result in corresponding constraints on resources such as energy, memory,
computational speed and communications bandwidth. The topology of the WSNs can vary from a simple
star network to an advanced multi-hop wireless mesh network. The propagation technique between the
hops of the network can be routing or flooding.
In computer science and telecommunications, wireless sensor networks are an active research area with
numerous workshops and conferences arranged each year, for example IPSN, SenSys, MobiCom and
EWSN. As of 2010, wireless sensor networks have reached approximately 120 million remote units
worldwide.
4. Resources:
The activity will require the following software, tools and equipment:
[Cite the materials you needed for this activity, including both hardware and software]
5. Instructions:
1. Write a code that allows the NodeMCU to transmit the current readings of an LM35 sensor and
an LDR(Set as a digital switch).
2. Include a device ID (your student number) to the data being transmitted by the NodeMCU.
3. Write a Python-based server program that will capture all these data, and separately store in
individual variables.
4. The Python program should be coded to print the values on the terminal.
6. Methodology
7. Diagrams
8. Codes
9. Test Procedures