personas:johnny:proyectos:indoor_diy_autosostenible
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
personas:johnny:proyectos:indoor_diy_autosostenible [2019/09/25 05:04] – kz | personas:johnny:proyectos:indoor_diy_autosostenible [2019/09/29 23:56] – kz | ||
---|---|---|---|
Línea 355: | Línea 355: | ||
#include < | #include < | ||
- | 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: | ||
</ | </ | ||
+ | |||
+ | ====== control de humedad y temperatura ====== | ||
+ | |||
+ | Se inicia de aqui [[https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | <code c++> | ||
+ | #include < | ||
+ | |||
+ | 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, | ||
+ | Serial.begin(115200); | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | // read the value from the sensor: | ||
+ | sensorValue = analogRead(sensorPin); | ||
+ | Serial.println(sensorValue); | ||
+ | // turn the ledPin on | ||
+ | digitalWrite(ledPin, | ||
+ | // stop the program for < | ||
+ | delay(sensorValue); | ||
+ | // turn the ledPin off: | ||
+ | digitalWrite(ledPin, | ||
+ | // stop the program for for < | ||
+ | delay(sensorValue); | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | Sensor totalmente seco: 833 | ||
+ | Sensor totalmente humedo: 482 | ||
+ | </ | ||
+ | |||
+ | |||
personas/johnny/proyectos/indoor_diy_autosostenible.txt · Última modificación: 2020/08/13 06:00 por kz