yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Mini Microbit Handle📖
1.Preparation before class
  • 1.1 MakeCode Programming Guide
  • 1.3 How to import tiny:bit library
2.MakeCode programming course
A.General basic course
  • 3.Aircraft war
  • 4.Fruit game
  • 1.Heart beat
  • 2.See who is pressing fast
  • 3.Flowing sand
  • 4.DIY thermometer
  • 5.Direction follower
  • 6.Listen to music
  • 7.Dice game
  • 8.Good morning, good night
B.V2 basic course
  • 1.Play sound effects
  • 2.Changing face
  • 3.Clapping your hands
  • 4.Little mp3
  • 5.Temperature alarm
  • 6.Alarm clock
  • 7.Touch song
  • 8.Detect sound
  • 9.Sleep mode
C.Handle game course
  • 1.Direction-guide
  • 2.Dodge bullet game
  • 5.Jump
  • 6.Mini-racing
  • 7.Pingpong
  • 8.Snake
  • 9.Two machine battle
  • 10.Faster than who shakes
D.Remote control car course
  • 1.Mbit car
  • 2.Tinybit car
  • 3.Buildingbit
  • 4.Lastbit V2
E.Remote control building block kit course
  • 1.Tumblebit
  • 2.Bipedbit
  • 3.Spinbit
  • 4.Armbit
  • 5.Omnibit
  • 6.Spiderbit
  • 7.Pretty car handle control
  • 8.Clip robot handle control
  • 9.Proficient carrier handle control
  • 10.Skip car handle control
  • 11.Mobile shooter handle control
3.MicroPython programming course
A.Basic course
  • 1.Heart beat
  • 2.Button game
  • 3.Flowing sand
  • 4.DIY thermometer
  • 5.Direction follower
  • 6.Listen to music
  • 7.Dice game
  • 8.Morning and night
B.Remote control course
  • 1.Microbit car
  • 2.Tinybit car
  • 3.Buildingbit
  • 4.Lastbit
C.Remote control building block course
  • 1.Tumblebit
  • 2.Spinbit
  • 3.Armbit
  • 4.Omnibit
  • 5.Spiderbit
  • 6.Bipedbit
  • 7.Pretty car handle control
  • 8.Clip robot handle control
  • 9.Proficient carrier handle control
  • 10.Skip car handle control
  • 11.Mobile shooter handle control
Download
  • Code
  • Hardware Manual
Download ZIP

Welcome to Mini Microbit Handle repository

1.Tumblebit


Tumble:bit Handle control

Learning goals

In this lesson, we will learn how to control tumble:bit car by micro:bit Handle.

Wireless communication principles

With the micro:bit radio module, different devices can work together through a simple wireless network. When the radio function is turned on for micro:bit, a simple wireless local area network is generated. The micro:bit board with radio function turned on can set parameters within the effective range.

Wireless communication is divided into sending and receiving two program blocks. Set the wireless group of radio to the same group, and the two micro:bit boards can communicate.

Code

Tumble:bit code

This code need to be downloaded into micro:bit board of tumble:bit car.

image.png 

image.png

image.png 

from microbit import * is to import everything from the micro:bit library. Every program using microbit must import this library. We also need to import Superbit library and import the RGB light library neopixel, radio wireless communication function library;

np = neopixel.NeoPixel (pin12,4): Initialize the RGB programming light library. The first parameter is the pins of the RGB light, and the second parameter is the number of RGB lights.

display.show (Image.HAPPY): Make a smile icon appear on the micro:bit dot matrix;

radio.on (): Turn on the wireless function. Because the wireless function consumes more power and occupies memory, it is turned off by default. You can also use radio.off () to turn off the wireless function;

radio.config (group = 1): configure wireless group=1, so that other micro:bit devices with wireless group=1 can communicate with each other, the default is 0, the select-able group is 0 ~ 255. Handle and car need to be set in same group.

Control the car forward and backward and turn left and right.

incoming = radio.receive (): Receives the data transmitted wirelessly and saves it to the incoming variable;

if incoming is 'up', the car moves forward,

if incoming is 'up', the car moves backward,

if incoming is 'left', the car will turn left, 

if incoming is 'right', the car will turn right, 

if incoming is 'stop', the car will stop.

if incoming is 'R', the body RGB lights up red,

if incoming is 'G', the body RGB lights up green,

if incoming is 'B', the body RGB lights up blue,

if incoming is 'Y', the body RGB lights up yellow.

!Note: The value of incoming should correspond to the value sent by the handle. Only the same value can receive and execute the command.

Handle code

This code need to be downloaded into micro:bit board of tumble:bit car.

image.png 

Case --- 1

image.png 

Import display、sleep、Image、ghandle and radio libray.

radio.on(): Open wirelessly function

radio.config(group=1): Set the wireless group = 1 to keep the same with the group of the car;

Case --- 2

image.png 

1) If it detects that ghandle.rocker (ghandle.up) is True, it means that the rocker of the handle is pushed up, and the ‘up’ command is sent wirelessly, and an upward icon is displayed on LED dot matrix.

2) If it detects that ghandle.rocker(ghandle.down) is True, it means that the rocker of the handle is pushed down, and the ‘down’ command is sent wirelessly, and an down icon is displayed on LED dot matrix.

3) If it detects that ghandle.rocker(ghandle.left) is True, it means that the rocker of the handle is pushed left, and the ‘left’ command is sent wirelessly, and an left icon is displayed on LED dot matrix.

4) If it detects that ghandle.rocker(ghandle.right) is True, it means that the rocker of the handle is pushed right, and the ‘right’ command is sent wirelessly, and an right icon is displayed on LED dot matrix.

5) If it detects that ghandle.rocker(ghandle. pressed) is True, it means that the rocker of the handle is pressed, and the ‘pressed’ command is sent wirelessly, and an “X” icon is displayed on LED dot matrix.

6) If it does not operate to send 'stop' and clear the display. 

Case --- 3

image.png 

Determine whether the button is pressed. The commands 'R', 'G', 'B', 'Y' are sent for B1 (red), B2 (green), B3 (blue), and B4 (yellow).

Programming and downloading

1.You should open the Mu software, and enter the code in the edit window, , as shown below.

Note! All English and symbols should be entered in English, and the last line must be a space.

image.png 

2.You can click the “Check” button to check if our code has an error. If a line appears with a cursor or an underscore, the program indicating this line is wrong.

image.png 

3.Click “REPL” button,check whether the tinybit library has been downloaded. If not, please refer to the [preparation before class]---> [About Python programming]

image.png 

4.Click the “Flash” button to download the program to micro:bit board.

image.png 

If the program is wrong or the experimental phenomenon is wrong after downloading, please confirm whether you have downloaded the Buildingbit libraryhex file we provided to the micro: bit board.

For the specific method of adding library files, please refer to 【1.Preparation before class】---【Python programming】

Experimental phenomena

After download is complete, open the power switch of handle We can see handle micro:bit dot matrix of car will display a smile pattern. Then, we can open the power switch of car, they will pair automatically.

The button on the right side of the handle can control headlights. Press the rocker down to turn off the headlights. Push the rocker forward, backward, left and right to control the car movement. 



Lastbit
Spinbit

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文