← All work

Smart room occupancy / Data & IoT

Connecting a room to the data it generates.

An IoT project connecting motion sensors, a database, and a web interface to explore occupancy and lighting use.

My role
IoT / full-stack development
When
2024
Built with
PIR sensors · NodeMCU · Arduino · C++ · Node.js · React · MySQL
The original room-occupancy project dashboard
Room occupancy · original project capture · Open full size ↗

Explore how it works

Try it yourself ↓
Interactive explanation · illustrative sample

A useful signal needs a little context.

Send motion and noise pulses, tune the filter, and advance time to explore occupancy detection.

Room 04 / sample sensor00:00:00
Room marked vacant
Illustrative light · off
Signal historyWaiting for a pulse
Tune the sample behavior
500 ms
90 sec
25%
Vacant in this example0s

Send a qualifying pulse to mark the room occupied.

Time advances only when you click. The example light turns on below 40% ambient light while the room is marked occupied.

A manual simulation of PIR signal filtering and occupancy history. Thresholds and the lighting response are illustrative. PIR detects motion, not the number of people; no sensor is connected.

The challenge

Room activity is physical, but understanding patterns requires collecting it consistently. This project connected sensor readings to a software interface for investigating occupancy and lighting use.

How I built it

Bring the hardware online

PIR motion sensors and a NodeMCU provided the hardware layer, with C++ code developed through the Arduino tooling.

Carry the signal through the stack

A Node.js backend connected readings to MySQL. A React interface exposed the resulting occupancy data and trends.

Work with imperfect input

The project involved sensor calibration, filtering, database queries, and debugging the communication between physical devices and the web application.

What came out of it

An integrated hardware-and-software project demonstrating how sensor data can inform a view of room activity, with practical experience connecting embedded code, an API, a relational database, and a web interface.

Sources & project context
  • Original portfolio case study, reviewed October 2026
  • Related client and server project structure, reviewed October 2026

More from the project

Smart room occupancy project screenshot 1
Smart room occupancy · project capture 1
Next projectNetwork malware analysis ↗