Indholdsfortegnelse:

Nodemcu Esp8266 + PIR + Blynk: 6 trin
Nodemcu Esp8266 + PIR + Blynk: 6 trin

Video: Nodemcu Esp8266 + PIR + Blynk: 6 trin

Video: Nodemcu Esp8266 + PIR + Blynk: 6 trin
Video: Как сделать СИСТЕМУ ПИР-БЕЗОПАСНОСТИ с ESP8266 | Приложение Blynk с PIR SECURITY SYSTEM[Nodemcu] 2024, Juni
Anonim
Nodemcu Esp8266 + PIR + Blynk
Nodemcu Esp8266 + PIR + Blynk

Nodemcu Esp8266 + PIR + Blynk

LABSTI - FIA - USMP

Trin 1: Materialer

- Nodemcu esp8266

- Sensor PIR

- Aplicativo móvil Blynk

Trin 2: Diseño

Diseño
Diseño
Diseño
Diseño

Trin 3: Konfiguration af Arduino IDE

Konfiguration af Arduino IDE
Konfiguration af Arduino IDE

El "Uploadhastighed" i konfigurationen af NodeMCU kan bruges som en "baudio" af skærmserier.

Trin 4: Konfiguration af Blynk

Konfiguration af Blynk
Konfiguration af Blynk
Konfiguration af Blynk
Konfiguration af Blynk
Konfiguration af Blynk
Konfiguration af Blynk

Anmodninger:

- Hent mere praktisk "Blynk"

Pasos:

  1. Vælg "+ Nyt projekt", til et nyt projekt.
  2. Vælg dispositivo (ESP8266), samler en nombre og vælger "Opret".
  3. Ingresar al proyecto recién creado y seleccionar la opción "(+)".
  4. Vælg "Knap", som kan bruges til at installere en ny opgave.
  5. Konfiguration af botanik:- Ingresar un nombre al botón.- Indlæser "OUTPUT" og vælger "V0". - Cambiar la opción "Mode" og "Switch".
  6. Vælg "Meddelelse".
  7. Konfiguration af notifikationer. Dejar por forudbestemt.
  8. Ingresar a la opción de "tuerca" para validar el dispositivo.
  9. Verificer el "Auth Token" sea el mismo que se ingreso en el código.

El Auth Token er en ny ordre, der nu kan bruges til at recibiremos por nuestro correo electrónico asociado.

Trin 5: Programmering

#omfatte

#define BLYNK_PRINT Serial

#omfatte

char auth = "Tu Auth Token"; // Auth Token for appen Blynk

/ * Credenciales de WiFi */

char ssid = "Tu rød"; // nombre de la red wifi char pass = "Tu contraseña"; // contraseña de la red wifi

/ * HC-SR501 bevægelsesdetektor */

#define pirPin 5 // Input til HC-S501 int pirValue; int pinValue;

BLYNK_WRITE (V0)

{pinValue = param.asInt (); }

ugyldig opsætning ()

{Serial.begin (115200); forsinkelse (10); Blynk.begin (auth, ssid, pass); pinMode (pirPin, INPUT); }

hulrum ()

{if (pinValue == HIGH) {getPirValue (); } Blynk.run (); }

void getPirValue (void)

{pirValue = digitalRead (pirPin); if (pirValue) {Serial.println ("Bevægelse registreret"); Blynk.notify ("Bevægelse registreret"); }}