This repository contains our IoT group project made in my first year (July 2022). The aim of the project was to create an end-to-end implementation of an IoT system.
A “smart” bathroom with automated light, flushing, and lid actuating mechanisms. The bathroom can also be controlled via a mobile application.
- Water Level Sensor
- ESP32 Module
- Ultrasonic Sensor
- Servo Motors
- LEDs
Implementation:
- When the user's distance is less than the threshold distance, the LED turns on and the servo motor rotates leading to the opening of the toilet lid.
- Then when the user’s distance exceeds the threshold distance, the LED turns off, the servo motor rotates again leading to the closing of the toilet lid, and another servo motor rotates leading to the activation of the flush.
- Initialize a WiFi client to connect the ESP32 with onem2m server. Store content instances based on ultrasonic sensor readings in a resource tree inside the server.
- Initialize a Bluetooth client to connect the ESP32 with a mobile application . Send data through bluetooth to the ESP32 when an on-click event occurs in the app leading to control of the hardware.
- In the event that the user does not flush after leaving the toilet, the water level sensor detects this invariance in flush tank level and sends a message to the bathroom organizer.