CONTROL OMNI ROBOT CAR WITH MOTION:BIT USING BLUETOOTH APP

CONTROL OMNI ROBOT CAR WITH MOTION:BIT USING BLUETOOTH APP

Would you like to create a robot to move and respond to your commands? In this tutorial, using a micro:bit and some essential components, you can build a robot that you can control with a Bluetooth app on your smartphone or tablet! Get ready to unleash your creativity and have fun with your very own robot!

 

Video Tutorial


Components Required

 

Connection

    

  • You can refer to the image for a visual representation.

  • Assemble the motors and wheels on the car cassis.

  • Connect the motor M1, M2, M3, and M4 to the MOTION:BIT.

  • To make the structure more stable, you can use cable ties to hold the car cassis.

 

     Code

           

    

 

1. Go to MakeCode Editor. and start a new project. 

2. Add the Bluetooth and Motion:bit extensions.

3. Add the following variables: bt_data, TOP_SPEED_A, and TOP_SPEED_B.

4. Add the following functions:

  • call moveUpperRight

  • call moveUpperLeft

  • call backward

  • call forward

  • call moveRight

  • call moveLeft

  • call spinLeft

  • call spinRight.

5. Refer to the code block in the picture above.

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

7. Download the code into your micro:bit.

 

Bluetooth App

 

Controlling the robot car:

  • Open the Bluetooth app.

  • Press the buttons on the app to control the robot car. Each button corresponds to a function that you have programmed in your code.

 

Troubleshooting:

  • If you have trouble connecting the Bluetooth app with the micro:bit, try to connect the Bluetooth on your device setting first with BBC micro:bit [gizet] until it is paired. 

  • Then, try again connecting the Bluetooth app with the micro:bit.

 

Hardware Components


Related Posts

Build an Autonomous Obstacle-Avoiding Robot Car Using MOTION:BIT

Build an Autonomous Obstacle-Avoiding Robot Car Using MOTION:BIT

In today's video, we'll show you how to make a super cool obstacle-avoiding robot car using MOTION:BIT!..
Getting Started with MOTION:BIT & Projects Guide

Getting Started with MOTION:BIT & Projects Guide

This guide will show you how to kick start your MOTION:BIT project with some guides or example code to utilize the key features of the micro:bit expansion board..
DC Motor

DC Motor

This guide will show you how to kick start your MOTION:BIT project with some guides or example code to utilize the key features of the micro:bit expansion board..
Li-Ion Battery and External Switch

Li-Ion Battery and External Switch

This guide will show you how to kick start your MOTION:BIT project with some guides or example code to utilize the key features of the micro:bit expansion board..
Build an RC Boat Using micro:bit

Build an RC Boat Using micro:bit

Ready to set sail? Learn how to build your own remote control boat using a micro:bit! Follow along with this easy-to-follow tutorial and you'll be cruising through the water in no time...