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ón
Revisión previa
Próxima revisiónAmbos lados, revisión siguiente
personas:johnny:proyectos:indoor_diy_autosostenible [2019/09/25 05:04] kzpersonas:johnny:proyectos:indoor_diy_autosostenible [2019/09/29 23:56] kz
Línea 355: Línea 355:
 #include <WiFiUdp.h> #include <WiFiUdp.h>
  
-const char *ssid = "TP-LINK_Extender_C464C2"; +const char *ssid = "el nombre de la red"; 
-const char *password = "alex1988alex";+const char *password = "el password de la red";
 const long utcOffsetInSeconds = -18000; // colombia UTC -5 const long utcOffsetInSeconds = -18000; // colombia UTC -5
 char daysOfTheWeek[7][12] = { char daysOfTheWeek[7][12] = {
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