Actualización del README

main
parent d060c754eb
commit 7de2026d31

@ -1,14 +1,14 @@
# 🌡️ Raspberry Pi 4 Temperature & Humidity Monitoring System (HTU21D)
# Raspberry Pi 4 Temperature & Humidity Monitoring System (HTU21D)
---
## 📌 Project Overview
## Project Overview
This project implements a real-time temperature and humidity monitoring system using a **Raspberry Pi 4** and an **HTU21D sensor**. The system reads environmental data via I2C, processes it using a C program, and displays the results on a web dashboard using Nginx.
---
## 🧠 System Architecture
## System Architecture
The system is structured as a simple data pipeline that connects the sensor, processing logic, and web interface. Data flows continuously from the physical environment to the user in a clear and modular way.
@ -44,16 +44,16 @@ The web page uses JavaScript to periodically request the JSON file and update th
---
### 🔄 Overall Flow
### Overall Flow
Data is captured by the sensor, processed by the C program, stored as JSON, served by Nginx, and displayed in the browser. This structure keeps the system simple, modular, and easy to maintain.
---
## 🧰 Materials
## Materials
### 🔧 Hardware
### Hardware
* Raspberry Pi 4
* HTU21D sensor
@ -61,7 +61,7 @@ Data is captured by the sensor, processed by the C program, stored as JSON, serv
* MicroSD card with Raspberry Pi OS
* Power supply
### 💻 Software
### Software
* Raspberry Pi OS / Debian
* GCC compiler
@ -72,15 +72,15 @@ Data is captured by the sensor, processed by the C program, stored as JSON, serv
---
## 🔌 Hardware Connections
## Hardware Connections
### 📷 Pin Reference Images
### Pin Reference Images
![Esquema de conexiones para la Raspberry Pi 4 y Sensor HTU21D](RaspberryPi4_Sensor_PinMap.jpg)
---
### 📍 Wiring Table
### Wiring Table
| HTU21D | Raspberry Pi 4 |
| ------ | -------------- |
@ -91,9 +91,9 @@ Data is captured by the sensor, processed by the C program, stored as JSON, serv
---
## 🚀 Deployment Guide (From Scratch)
## Deployment Guide (From Scratch)
### 🧰 1. Install Dependencies
### 1. Install Dependencies
```bash
sudo apt update
@ -105,7 +105,7 @@ sudo apt install gcc i2c-tools libi2c-dev nginx git
---
### 📥 2. Clone the Repository
### 2. Clone the Repository
```bash
git clone https://gitea.itmorelia.com/Verano-Delfin-2026/Temperature-Humidity-Sensor.git
@ -117,7 +117,7 @@ cd Temperature-Humidity-Sensor
---
### ⚙️ 3. Enable I2C
### 3. Enable I2C
```bash
sudo raspi-config
@ -137,7 +137,7 @@ sudo reboot
---
### 🔍 4. Verify Sensor
### 4. Verify Sensor
```bash
i2cdetect -y 1
@ -152,7 +152,7 @@ Expected:
---
### 🧑‍💻 5. Compile the Sensor Program
### 5. Compile the Sensor Program
```bash
cd sensors/HTU21D
@ -164,7 +164,7 @@ gcc main.c htu21d.c -o HTU21D -li2c
---
### 📂 6. Deploy Web Files
### 6. Deploy Web Files
```bash
sudo cp -r ~/basic-ui-dashboard/* /var/www/html/
@ -178,7 +178,7 @@ sudo mkdir -p /var/www/html/data
---
### 🔐 7. Set Permissions
### 7. Set Permissions
```bash
sudo chmod +x /var/www/html/sensors/HTU21D/HTU21D
@ -190,7 +190,7 @@ sudo chown -R www-data:www-data /var/www/html
---
### ▶ 8. Run Sensor Loop
### ▶8. Run Sensor Loop
```bash
cd /var/www/html
@ -202,7 +202,7 @@ while true; do ./sensors/HTU21D/HTU21D > data/HTU21D.json; sleep 5; done
---
### 🌐 9. Start Nginx
### 9. Start Nginx
```bash
sudo systemctl start nginx
@ -217,7 +217,7 @@ sudo systemctl status nginx
---
### 🌍 10. Get Raspberry Pi IP
### 10. Get Raspberry Pi IP
```bash
hostname -I
@ -232,7 +232,7 @@ Example:
---
### 🖥️ 11. Access from Another Computer
### 11. Access from Another Computer
Open a browser and go to:
@ -248,7 +248,7 @@ http://192.168.1.100
---
## 🔄 Real-Time Updates
## Real-Time Updates
JavaScript fetch:
@ -262,7 +262,7 @@ fetch('./data/HTU21D.json?nocache=' + Date.now())
* Forces fresh data request
## 🎯 Conclusion
## Conclusion
This project integrates:

Loading…
Cancel
Save