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.
Diff: modulos/sistema/Sistema.h
- Revision:
- 0:b5316e9f3cb5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modulos/sistema/Sistema.h Thu May 27 02:32:03 2021 +0000
@@ -0,0 +1,33 @@
+#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
\ No newline at end of file