Skip to content

Projects

#12 Car Parking System With micro:bit

by PicoBricks Team 09 May 2025

Today, buildings such as hospitals, schools, business centers, etc., often have open or closed parking lots where a large number of people enter and exit. The main reason for the construction of these parking lots is the significant increase in automotive usage in cities. Barrier systems are installed at the entrances of these parking lots to control access. While people were assigned to control these barrier systems in the past, nowadays, with the advancement of sensor technologies, automatic access systems are used. Vehicles are detected using various sensors, the barriers are raised using motor systems, and vehicle passage is allowed.

In this project, we will use the ultrasonic distance sensor connected to PicoBricks to create a barrier system by using waste bins found in our home, depending on the value detected by the sensor. By moving the servo motor connected to the prepared barrier system to the desired angle and we will allow vehicle passage. A checkmark icon (✓) will appear on the Micro:Bit Matrix LED when permission is granted for passage, and a cross (X) icon will appear when permission is denied.

Connection Diagram:

You can prepare this project by breaking down PicoBricks modules at proper points.

Project Images:

MakeCode Code of The Project


Python Code of The Project:


#Car Parking System
from microbit import *
from picobricks import *

motor = motordriver()
motor.servo(1,90)

while True:
    distance = measure_distance()
    #print(distance)
    if round(distance)<6:
        motor.servo(1,180)
        display.show(Image.YES)
        sleep(1000)
    else:
        display.show(Image.NO)
        motor.servo(1,180)

MicroBlocks Code of The Project

 

Prev Post
Next Post

Thanks for subscribing!

This email has been registered!

Shop the look
Choose Options

Edit Option

Back In Stock Notification

Compare

Product SKURatingDescription Collection Availability Product Type Other Details
this is just a warning
Login
Shopping Cart
0 items
Same Day Shipping No Extra Costs
Easy Returns Guarantee Return with Ease
Secure Checkout Secure Payment