Diferencia entre revisiones de «Sensor de humedad del suelo»

Página creada con «<syntaxhighlight lang="c++" line copy> void setup() { Serial.begin(9600); } void loop() { int s = analogRead(A0); long humedad; // long map(long x, long in_min, long in_max, long out_min, long out_max) humedad = map(s, 150, 437, 100, 0); Serial.println(humedad); delay(1); } </syntaxhighlight>»
 
Sin resumen de edición
Línea 13: Línea 13:
}
}
</syntaxhighlight>
</syntaxhighlight>
<gallery>
Humedad de suelo 1.2 esquemático.png
</gallery>