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.
Revision 3:a547a9dec222, committed 2016-02-26
- Comitter:
- OlySolano
- Date:
- Fri Feb 26 05:48:20 2016 +0000
- Parent:
- 2:941f7e99e345
- Commit message:
- funcional
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Feb 23 00:09:17 2016 +0000
+++ b/main.cpp Fri Feb 26 05:48:20 2016 +0000
@@ -1,9 +1,9 @@
#include "mbed.h"
Serial pc (USBTX, USBRX);
-DigitalOut bomba(D0);
-DigitalOut ledg(LED1);
-DigitalOut ledr(LED2);
+DigitalOut bomba(D2);
+DigitalOut ledr(LED1);
+DigitalOut ledg(LED2);
AnalogIn hum(A0);
float valor,pin;
@@ -21,16 +21,15 @@
ledg=0;
bomba=1;
}else{
- ledr=1;
+ ledg=1;
}
- if (valor>500 && valor<850){
+ if (valor>500 ){
pc.printf("seco %.0f\n",valor);
ledr=0;
- bomba=0;
+ bomba=0;
}else{
- ledg=1;
+ ledr=1;
}
- if(valor>=850){
- bomba=1;
+
}}
- }
+