You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
2.4 KiB
Markdown
164 lines
2.4 KiB
Markdown
# Inicio Rapido
|
|
|
|
Esta guia es para levantar el proyecto sin entrar todavia en todos los detalles
|
|
tecnicos.
|
|
|
|
## Que Necesitas
|
|
|
|
Para desarrollo sin sensores:
|
|
|
|
- Una computadora con Node.js.
|
|
- El repositorio clonado.
|
|
|
|
Para Raspberry Pi:
|
|
|
|
- Raspberry Pi con Raspberry Pi OS.
|
|
- I2C habilitado.
|
|
- Modulos Atlas Scientific EZO en modo I2C.
|
|
- Red local para abrir el dashboard.
|
|
|
|
## Probar Sin Sensores
|
|
|
|
Instale dependencias:
|
|
|
|
```bash
|
|
npm ci
|
|
```
|
|
|
|
Ejecute pruebas:
|
|
|
|
```bash
|
|
npm test
|
|
```
|
|
|
|
Abra dos terminales.
|
|
|
|
Terminal 1:
|
|
|
|
```bash
|
|
EZO_MODE=demo npm run acquire
|
|
```
|
|
|
|
Terminal 2:
|
|
|
|
```bash
|
|
EZO_MODE=demo npm start
|
|
```
|
|
|
|
Abra:
|
|
|
|
```text
|
|
http://localhost:3000/frontend/index.html
|
|
```
|
|
|
|
En Windows PowerShell:
|
|
|
|
```powershell
|
|
$env:EZO_MODE = "demo"
|
|
npm run acquire
|
|
```
|
|
|
|
```powershell
|
|
$env:EZO_MODE = "demo"
|
|
npm start
|
|
```
|
|
|
|
## Instalar En Raspberry Pi
|
|
|
|
Clone el repositorio:
|
|
|
|
```bash
|
|
git clone ssh://git@gitea.itmorelia.com:222/Verano-Delfin-2026/bioreactor-multiparametric-daq-shield.git
|
|
cd bioreactor-multiparametric-daq-shield
|
|
```
|
|
|
|
Ejecute el instalador:
|
|
|
|
```bash
|
|
chmod +x scripts/install-raspberry-pi.sh
|
|
sudo ./scripts/install-raspberry-pi.sh
|
|
```
|
|
|
|
Abra el dashboard desde otra computadora:
|
|
|
|
```text
|
|
http://IP_DE_LA_RASPBERRY/frontend/index.html
|
|
```
|
|
|
|
## Verificar Que Esta Corriendo
|
|
|
|
```bash
|
|
systemctl status photobioreactor-api --no-pager
|
|
systemctl status photobioreactor-acquisition --no-pager
|
|
systemctl status nginx --no-pager
|
|
```
|
|
|
|
Si todo esta bien, los servicios deben aparecer como `active (running)`.
|
|
|
|
## Ver Sensores En I2C
|
|
|
|
```bash
|
|
i2cdetect -y 1
|
|
```
|
|
|
|
Mapa esperado:
|
|
|
|
| Direccion | Sensor |
|
|
|---:|---|
|
|
| `0x61` | EZO-DO |
|
|
| `0x63` | EZO-pH |
|
|
| `0x64` | EZO-EC |
|
|
| `0x66` | EZO-RTD |
|
|
|
|
Si falta un sensor, revise cableado, alimentacion y modo I2C.
|
|
|
|
## Habilitar Solo Sensores Conectados
|
|
|
|
Edite:
|
|
|
|
```bash
|
|
sudo nano /opt/photobioreactor/config/runtime.json
|
|
```
|
|
|
|
Ejemplo con RTD, pH y EC:
|
|
|
|
```json
|
|
{
|
|
"loggingRateSeconds": 5,
|
|
"historyRetentionDays": 30,
|
|
"enabledSensors": [
|
|
"temperature",
|
|
"ph",
|
|
"ec"
|
|
]
|
|
}
|
|
```
|
|
|
|
Reinicie adquisicion:
|
|
|
|
```bash
|
|
sudo systemctl restart photobioreactor-acquisition
|
|
```
|
|
|
|
## Revisar Datos
|
|
|
|
```bash
|
|
cat /opt/photobioreactor/data/EZORTD.json
|
|
cat /opt/photobioreactor/data/EZOPH.json
|
|
cat /opt/photobioreactor/data/EZOEC.json
|
|
```
|
|
|
|
```bash
|
|
tail /opt/photobioreactor/logs/temperature.csv
|
|
tail /opt/photobioreactor/logs/ph.csv
|
|
tail /opt/photobioreactor/logs/ec.csv
|
|
```
|
|
|
|
## Si Algo Falla
|
|
|
|
Lea:
|
|
|
|
```text
|
|
docs/TROUBLESHOOTING.md
|
|
```
|