📘Learn Digital Making weekly on Telegram. Join Channel Now📱
Build Auto Barrier Gate with Microbit

Build Auto Barrier Gate with Microbit

Automatic barriers are a common sight at the entrance of car parks and restricted areas. They control the flow of traffic, keep track of vehicles entering a property, and prevent unwarranted access to private properties.

 

In this tutorial, we will learn how to build an auto barrier gate using microbit with REKA:BIT.

Video Tutorial

Components Required

Connection

circuit diagram65

By following the diagram above:

  • Connect the servo motor to the first port
  • Connect Ultrasonic sensor to the first grove port in REKA:BIT (P1 to Trig, P0 to Echo)

Code

microbit screenshot 50

Connect your REKA:BIT to your computer and open MakeCode editor to start programming.

  • Add (REKA:BIT), and (makerbit-ultrasonic) extensions and follow the code block in the picture above
  • After completing the code, download it on microbit

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

Project Complete

project complete

Upon completing the project successfully, the barrier gate will open once the car passes near the ultrasonic sensor.

Related Products

SG90 Micro Servo -17% Best Seller

SG90 Micro Servo

RM6.50 RM7.80

x 1 unit(s)
3V-5.5V SR04P Ultrasonic Ranging Module -18% Best Seller

SG90 Micro Servo

Not Available

x 1 unit(s)