@ -14,31 +14,31 @@ The system is structured as a simple data pipeline that connects the sensor, pro
---
---
### 🔹 Hardware and Communication Layer
### Hardware and Communication Layer
The HTU21D sensor measures temperature and humidity and communicates with the Raspberry Pi using the I2C protocol. This allows the Raspberry Pi to request and receive raw data from the sensor.
The HTU21D sensor measures temperature and humidity and communicates with the Raspberry Pi using the I2C protocol. This allows the Raspberry Pi to request and receive raw data from the sensor.
---
---
### 🔹 Data Processing Layer
### Data Processing Layer
A C program interacts with the I2C interface to read the sensor data. It converts the raw binary values into human-readable units such as degrees Celsius and percentage humidity, and formats the result as JSON.
A C program interacts with the I2C interface to read the sensor data. It converts the raw binary values into human-readable units such as degrees Celsius and percentage humidity, and formats the result as JSON.
---
---
### 🔹 Data Storage Layer
### Data Storage Layer
The JSON file stores the latest sensor readings. It acts as an intermediate layer, separating the data acquisition process from the web interface.
The JSON file stores the latest sensor readings. It acts as an intermediate layer, separating the data acquisition process from the web interface.
---
---
### 🔹 Web Server Layer
### Web Server Layer
Nginx serves the JSON file and the web page over HTTP. It allows other devices on the network to access the system through a browser.
Nginx serves the JSON file and the web page over HTTP. It allows other devices on the network to access the system through a browser.
---
---
### 🔹 Presentation Layer
### Presentation Layer
The web page uses JavaScript to periodically request the JSON file and update the displayed values dynamically, enabling near real-time visualization.
The web page uses JavaScript to periodically request the JSON file and update the displayed values dynamically, enabling near real-time visualization.