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.
main.cpp
- Committer:
- OlySolano
- Date:
- 2016-02-19
- Revision:
- 1:c234f83e4ee3
- Parent:
- 0:bceaaaa8460e
- Child:
- 2:941f7e99e345
File content as of revision 1:c234f83e4ee3:
#include "mbed.h"
Serial pc (USBTX, USBRX);
//DigitalIn hum(D0);
AnalogIn hum(A0);
float valor;
int main() {
while(1) {
valor=hum.read();
if(valor <=300){
pc.printf("muy humedo %d\n",valor);
}
if (valor>300 && valor <=700){
pc.printf ("humedo, no regar %d\n", valor);
if (valor>700){
pc.printf("seco %d\n",valor);
wait(5.0);
}}}
}