IoT-Based Door Lock Using micro:bit and Blynk

IoT-Based Door Lock Using micro:bit and Blynk

With this IoT-based door lock, users can have access to control the door lock remotely through their smartphones. All you need is a micro:bit, Grove WiFi 8266, and servo motor.

 

Video Tutorial

 

Components Required

 

Connection

By following the diagram above:

  • Connect the grove Wi-Fi module to P15 and P16
  • Connect the servo motor to port 1

 

Blynk Setup

  1. go to Blynk website, create a new account and log in
  2. create a new template


     
  3. from datastream add a virtual pin 



     
  4.  then add a new device


     
  5. select the template that you have created
  6. now copy the token and paste it into the micro:bit code

  7. on your phone, open Blynk app and click on micro:bit device
  8. from the widget box, add a button and select virtual pin 0

 

Code

Connect your micro:bit to your computer and open MakeCode editor to start programming.

  • Add “ESP8266 Cytron” extension and REKA:BIT extension as well, then follow the code block in the picture above
  • Type in the name and password of your WiFi
  • Paste the Token that you have copied from Blynk, and type in "V0" in Pin section
  • After completing the code, download it on microbit

You can also view and edit the code by clicking here!

 

Project Complete

Now you will have access to control the door lock remotely through your smartphone.

Related Products