Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
modulos/sistema/Sistema.h
- Committer:
- cbiale
- Date:
- 2021-05-27
- Revision:
- 0:b5316e9f3cb5
File content as of revision 0:b5316e9f3cb5:
#ifndef SISTEMA_H
#define SISTEMA_H
#include "mbed.h"
#include "Tiempo.h"
#include "ControladorLuminosidad.h"
#include "ControladorTemperatura.h"
class Sistema {
public:
Sistema(Tiempo& tiempo, float minimaLuz, float maximaTemperatura, PinName const &pinLuz, PinName const &pinVentilador,
PinName const &pinLuminosidad, PinName const &pinTemperaturaHumedad, PinName const &pinSirena);
void controlar();
private:
// temporizador y cola de mensajes
Ticker temporizador;
EventQueue cola;
// hilo para manejar eventos
Thread hiloEventos;
// cantidad de lecturas a realizar por los controladores
int const cantidadLecturas = 12;
// tiempo
Tiempo tiempo;
// controlador de luminosidad
ControladorLuminosidad controladorLuminosidad;
// controlador de temperatura
ControladorTemperatura controladorTemperatura;
};
#endif