
This project involves designing and building a four-wheeled robotic car controlled remotely using a smartphone via Bluetooth. It is based on a Micro:bit board, a Driver Expansion Board, and a Four-Wheeled Car Chassis equipped with four DC motors.
The Micro:bit is installed on the Driver Expansion Board, which provides the necessary motor connections and allows the control of the four wheels. A Bluetooth communication system enables the smartphone to communicate wirelessly with the Micro:bit.
A dedicated mobile application provides a user-friendly control interface with buttons for moving the car forward, backward, turning left, turning right, and stopping.
By pressing the corresponding buttons on the smartphone, commands are transmitted via Bluetooth to the Micro:bit. The Micro:bit processes these commands and sends the appropriate signals to the Driver Expansion Board, which controls the four motors to perform the requested movements.

The Micro:bit is a small programmable electronic board that acts as the brain of the robotic car. It receives commands from the smartphone via Bluetooth, processes them, and sends control signals to the Driver Expansion Board to manage the motors.

The Driver Expansion Board is used to connect the Micro:bit to the car's motors and control their operation. It receives commands from the Micro:bit and controls the speed and direction of rotation of the four DC motors.

The four-wheeled car chassis provides the mechanical structure of the robot. It consists of four DC motors, four wheels, and a supporting frame. The motors allow the car to move forward, backward, turn left, and turn right.

Jumper wires are used to make the electrical connections between the Micro:bit, the GPIO expansion board and the servo motor.

The two 3.7V rechargeable batteries provide the electrical power required to operate the robotic car. They supply energy to the Driver Expansion Board and the four DC motors, allowing the car to move autonomously according to the commands received from the sender Micro:bit.


To assemble the robotic car, follow these steps:
1. Micro:bit Receiver: Insert the receiver Micro:bit into the dedicated connector on the Driver Expansion Board, ensuring that it is correctly positioned.
2. DC Motors: Connect the four DC motors to the motor output terminals (M1, M2, M3 and M4) of the Driver Expansion Board. These motors control the rotation of the four wheels.
3. Power Supply: Connect the two 3.7V rechargeable batteries to the power input of the Driver Expansion Board, respecting the positive (+) and negative (−) terminals.
4. Car Chassis: Fix the four motors and wheels to the chassis, then secure the Driver Expansion Board and battery holder onto the car.
5. Final Check: Verify all electrical connections, battery polarity and mechanical assembly before switching on the car.
1- Go to Microsoft MakeCode and start a new project.
2- In MakeCode, open the Blocks Editor (https://makecode.microbit.org/).
3. Opening the Extensions Library
Click on Extensions at the bottom of the MakeCode toolbox to access additional programming libraries.

4. Installing the DFROBOT Motor Extension
In the Extensions search field, enter the following GitHub address: https://github.com/DFRobot/pxt-motor
Select the motor extension to add the DFRobot motor-control library to the MakeCode environment.
This extension provides programming blocks for controlling DC motors, stepper motors and servos.

6. Using the DF-Driver Category
After installing the extension, a new category named DF-Driver appears in the MakeCode toolbox.
For this project, the Motor block is particularly important because it allows the receiver Micro:bit to control the four DC motors connected to the Driver Expansion Board.

5- Add Bluetooth Extension:
Click on the "Extensions" option in the bottom left corner.

Search and add the "Bluetooth" extension by clicking on it.



This program, developed in the Microsoft MakeCode environment, allows the Micro:bit to control a four-wheeled robotic car using Bluetooth communication with a smartphone.
1. Bluetooth Connection Management
- On Bluetooth connected: Initializes the Bluetooth UART service and displays the letter "C" on the Micro:bit LED matrix to indicate that the connection has been established.
- On Bluetooth disconnected: Displays the letter "D" to indicate that the Bluetooth connection has been interrupted.
2. Receiving and Processing Commands
When Bluetooth data is received, the program reads the incoming command using the Bluetooth UART service and stores it in the variable cmd. The received command is then transmitted using the Bluetooth UART write string block.
3. Controlling the Car's Movements
The program uses conditional statements (if) to compare the value of cmd with the commands received from the smartphone. Depending on the received command, it controls the direction and speed of the four motors (M1, M2, M3 and M4).
- Forward: All four motors rotate clockwise (CW) at speed 70, moving the car forward.
- Backward: All four motors rotate counterclockwise (CCW) at speed 70, moving the car backward.
- Left: Motors M1 and M3 rotate counterclockwise, while M2 and M4 rotate clockwise, allowing the car to turn left.
- Right: Motors M1 and M3 rotate clockwise, while M2 and M4 rotate counterclockwise, allowing the car to turn right.
- Stop: The Motor Stop All block stops all four motors.
The mobile application is developed using MIT App Inventor, a visual programming environment that allows users to create Android applications using graphical blocks.
The application provides a simple and user-friendly interface for remotely controlling the four-wheeled robotic car through Bluetooth communication with the Micro:bit board.

It includes directional control buttons that allow the user to perform the following movements:
- Forward: Moves the robot car forward.
- Backward: Moves the robot car backward.
- Left: Turns the robot car to the left.
- Right: Turns the robot car to the right.
- Stop: Stops all four motors.
The application also includes a Bluetooth connection feature that allows the smartphone to establish communication with the Micro:bit.
When the user presses a control button, the application sends the corresponding text command (Forward, Backward, Left, Right, or Stop) to the Micro:bit via Bluetooth. The Micro:bit processes the received command and controls the motors through the Driver Expansion Board.
Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.
Zaouiet Kontech-Jemmel-Monastir-Tunisia
Robotic site created by Mohamed Ali Haj Salah - Teacher info