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: main.cpp
- Revision:
- 1:434f82fb0641
- Parent:
- 0:3870563dc975
--- a/main.cpp Thu Jan 17 23:48:12 2019 +0000
+++ b/main.cpp Fri Jan 18 02:59:48 2019 +0000
@@ -39,10 +39,12 @@
j = 0;
acum = 0;
promedio = 0;
+ Tacum = 0;
while (j < mediciones) // Presentacion de Mediciones
{
device.printf("Sensor : (%f)\n", sensor.read());
+ lectura = sensor.read();
if (sensor.read() >= 0 && sensor.read() < 0.3)
{
@@ -66,12 +68,14 @@
led3 = 1;
}
else
+ {
led3 = 0;
-
+ }
device.printf("Temperatura: (%4.2f)\n", T);
- lectura = sensor.read();
+
acum = acum + lectura;
Tacum = Tacum + T;
+ device.printf("Temperatura Acum : (%4.2f)\n", Tacum);
wait(tiempo); // Espera de n seg por Mediciom
j++;