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.
Dependencies: mbed
Fork of ControlTemperatura_2_3 by
Diff: main.cpp
- Revision:
- 5:cc6ff3f4aca1
- Parent:
- 4:9d435331bbc7
- Child:
- 6:de176672744c
--- a/main.cpp Thu Apr 09 07:17:41 2015 +0000
+++ b/main.cpp Thu Apr 09 07:30:53 2015 +0000
@@ -2,6 +2,8 @@
// --------------------------------------------------------------------------- Inclusiones
#include "mbed.h"
#include "string.h"
+#include <TimerEvent.h>
+#include <Ticker.h>
using namespace std;
#define Si 1
@@ -66,7 +68,8 @@
// --------------------------------------------------------------------------- Prototipos
void LeerSerie (void); // Función para leer el puerto serie
void LeerSensores (void); // Función para leer temperatura delos sensores
-float convertirTemp(float promedio); // Función para convertir la lectura ADC a temperatura
+float convertirTemp(float promedio); // Función para convertir la lectura ADC a temperatura
+void Contador(void); // Función para contar el tiempo transcurrido en segundos
// --------------------------------------------------------------------------- Programa principal
@@ -75,6 +78,7 @@
pc.baud(9600);
pc.printf("Iniciando\n\r"); // Se imprime y se da enter
pc.attach(&LeerSerie);
+ //timmer.attach(&Contador,1.0);
while(inicioProceso == No)
{
@@ -161,7 +165,7 @@
pc.printf("Reflector 4: Encendido\r\n");
}
- while(pausaProceso == Si) // ---------------------------------------- Proceso Pausado
+ while((pausaProceso == Si) && (finProceso == No)) // ---------------------------------- Proceso Pausado
{
pc.printf("Proceso Puasado\r\n");
// Apagar Ventiladores
@@ -175,9 +179,11 @@
pc.printf("Reflectores Apagados\r\n");
wait(1);
}
+ wait(1);
}
pc.printf("Proceso Terminado\r\n");
+ while(1);
}
@@ -324,4 +330,10 @@
return temperatura;
}
+// --------------------------------------------------------------------------- Contador
+void Contador(void)
+{
+
+}
+
\ No newline at end of file
