RoboCircuits
Published © GPL3+

IoT Door Lock Project

Lock your door from anywhere

BeginnerFull instructions provided2 hours212
IoT Door Lock Project

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth)
DFRobot FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth)
×1
Linear Solenoid, 12 VDC
Linear Solenoid, 12 VDC
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

PCB Gerber

Schematics

Door Lock Schematics

Code

DoorLock.ino

Arduino
#define BLYNK_PRINT Serial

/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID   "YourTemplateID"


#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
  state = digitalRead(15);
  if(state != pstate)
  {
    Blynk.virtualWrite(V1,state);
    pstate = state;
  }
}

Credits

RoboCircuits

RoboCircuits

27 projects • 159 followers
YouTuber, Explorer, Creator, Programmer, Arduino Lover and Engineer

Comments

Add projectSign up / Login