📘 CodingMarble Learn

Internet of Things (IoT)

The Internet of Things (IoT) is a network of everyday objects that have sensors, a small computer and a network connection, so they can collect data, share it over the internet and act on it. A sensor turns a physical change into data, a microcontroller processes it, the network (Wi-Fi, Bluetooth, Zigbee, 4G/5G, LoRa) carries it to a cloud server or app, and an actuator turns commands into action. IoT is described in three layers: perception, network and application. It brings convenience and saves energy, but needs strong privacy and security.

🎬 Step-by-step story

  1. This box is an IoT “thing”. It has a sensor (the eyes), a microcontroller (a tiny brain) and an antenna for Wi-Fi (the voice).
  2. The sensor measures the room. The red number climbs to 31 °C. Heat has become data.
  3. Blue packets of data travel from the device to the Wi-Fi router, then across the internet to the cloud.
  4. In the cloud a rule says: if temperature is more than 28 °C, turn the fan on. The phone app shows 31 °C with a warning.
  5. A green command packet travels back to the device. The actuator, a fan, starts to spin. The loop is complete: sense, send, decide, act.
  6. Your turn: change the room temperature and the fan limit, and switch on the lock to see encrypted packets.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What makes a device “smart”?

It has a sensor, a tiny computer and a network link, so it can measure, share and act. The 3D device shows all three parts.

How does a sensor turn heat into a number?

Its material changes electrically with temperature (for example resistance). The microcontroller reads that change and converts it to °C.

Does data go straight from the device to my phone?

Usually not. It goes through the router and the internet to a cloud server, and the phone app reads it from there.

Who decides to switch on the fan?

A rule (IF … THEN …) running in the cloud or on the device. You can change the limit in free play.

How is the action done?

An actuator, here the fan motor through a relay, receives the command and acts.

Can someone read my IoT data on the way?

Without encryption, yes. Turn on the lock in free play: packets become sealed boxes that only the receiver can open.

What is the Internet of Things?

The Internet of Things (IoT) connects ordinary objects (lamps, meters, watches, pumps, cars) to the internet so they can sense, share data and act without a person doing each step.

Features of IoT:

Applications: smart homes, health bands, smart farms, factories (Industry 4.0), smart cities, logistics tracking.

Parts of an IoT system: sensors, actuators, clients and servers

A simple project: temperature sensor → microcontroller → Wi-Fi → cloud dashboard → fan relay.

How IoT devices communicate: the three-layer model

  1. Perception layer: sensors and actuators touching the real world.
  2. Network layer: carries data. Short range: Wi-Fi, Bluetooth, Zigbee, RFID/NFC. Long range: 4G/5G mobile, LoRa, NB-IoT. Data is sent in small packets using protocols such as MQTT or HTTP.
  3. Application layer: cloud services and apps that store, show and act on data.

A smart home often has a hub that talks Zigbee or Bluetooth to small sensors and Wi-Fi to the router. Some decisions are made in the cloud; some are made on the device itself (edge computing) for speed.

Benefits, problems, privacy and security

Benefits: saves energy and water, early warnings (gas leak, fall alarm), less manual work, new services such as pay-per-use.

Problems: devices with weak default passwords can be hacked; cameras and speakers can leak private life; devices stop working without internet; e-waste.

Protection:

Try it: design a smart-home system

On paper, design a “smart plant pot”. List: the sensor (soil moisture), the actuator (small pump), the rule (if moisture < 30% water for 5 s), the network (Wi-Fi), the app screen, and one security step. If you have a micro:bit or similar board, build it with a cup of soil. In the 3D, raise the temperature above the limit and watch the fan switch on.

Key formulas and definitions

Worked examples

1. Name the sensor and actuator in an automatic street light.

Sensor: light sensor (LDR) measures daylight. Actuator: relay that switches the lamp on when it gets dark.

2. A smart bin sends its fill level every 30 minutes. How many messages does it send in a day?

24 h × 2 per hour = 48 messages per day.

3. Write the rule and list the layers for a smart irrigation system.

Rule: IF soil moisture < 30% AND no rain forecast THEN open valve for 10 minutes. Perception: moisture sensor + valve. Network: LoRa or 4G to the cloud. Application: farmer's phone app showing moisture and a manual button.

4. A family's smart camera still uses the password “admin”. What could go wrong and how do you fix it?

Attackers who scan the internet for default passwords can watch the video. Fix: set a strong unique password, update the firmware, turn on encryption and two-step login.

Common mistakes

Practice quiz

1. Which part turns a physical change into data?
2. A motor that opens a window in a smart home is a(n):
3. Which network suits a farm sensor 5 km away using little power?
4. The layer that contains cloud services and phone apps is the:
5. Encryption protects data by:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is IoT in simple words?

Everyday things connected to the internet so they can measure, share data and act by themselves.

What are the main parts of an IoT system?

Sensors, a microcontroller, a network connection, a cloud server or app, and actuators.

Is IoT safe?

It can be, if you use strong passwords, update devices, turn on encryption and share only needed data.

Where this is taught

Spain4º ESODigital devices, operating systems and communication
Spain4º ESOComputational thinking, automation and robotics
Spain1º BachilleratoComputer systems and programming
South Korea고등학교 2학년Science and the human future
South Korea고등학교 2학년Computing systems
South Korea고등학교 2학년Sustainable convergent engineering
Germany (Bavaria)Jahrgangsstufe 13Internet of Things
China八年级(初二)Module: IoT practice and exploration
China高二Sel.6 Smart-home design (life)
China高二Sel.2 Network basics

Learn first

Learn next

Related lessons

All Computer Science lessons