Herramientas de usuario

Herramientas del sitio


personas:johnny:proyectos:indoor_diy_autosostenible

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisiónAmbos lados, revisión siguiente
personas:johnny:proyectos:indoor_diy_autosostenible [2019/09/25 05:05] kzpersonas:johnny:proyectos:indoor_diy_autosostenible [2019/09/29 23:56] kz
Línea 460: Línea 460:
  
 </code> </code>
 +
 +====== control de humedad y temperatura ======
 +
 +Se inicia de aqui [[https://create.arduino.cc/projecthub/Pedro52/arduino-capacitive-soil-moisture-sensor-diy-with-esp32-d7ad72|conectar sensor de humedad capacitivo]]
 +
 +{{:personas:johnny:proyectos:capacitivo.jpg?400|}}
 +
 +{{:personas:johnny:proyectos:photo4938261042715273252.jpg?400|}}
 +
 +<code c++> 
 +#include <Arduino.h>
 +
 +int sensorPin = A0;    // select the input pin for the potentiometer
 +int ledPin = D4;      // select the pin for the LED
 +int sensorValue = 0;  // variable to store the value coming from the sensor
 +
 +void setup() {
 +  // declare the ledPin as an OUTPUT:
 +  pinMode(ledPin, OUTPUT);
 +  Serial.begin(115200);
 +}
 +
 +void loop() {
 +  // read the value from the sensor:
 +  sensorValue = analogRead(sensorPin);
 +  Serial.println(sensorValue);
 +  // turn the ledPin on
 +  digitalWrite(ledPin, HIGH);
 +  // stop the program for <sensorValue> milliseconds:
 +  delay(sensorValue);
 +  // turn the ledPin off:
 +  digitalWrite(ledPin, LOW);
 +  // stop the program for for <sensorValue> milliseconds:
 +  delay(sensorValue);
 +}
 +
 +</code>
 +
 +<WRAP center round important 60%>
 +Sensor totalmente seco: 833
 +Sensor totalmente humedo: 482
 +</WRAP>
 +
 +
  
  
  
personas/johnny/proyectos/indoor_diy_autosostenible.txt · Última modificación: 2020/08/13 06:00 por kz