yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Building:bit Superkit📖
0.First Trial Video
1.Assembly Course
  • 1.1Mobile shooter
  • 1.2Pretty car
  • 1.3Clip robot
  • 1.4Proficient carrier
  • 1.5Skip car
  • 1.6Freestyle
  • 1.7Spider
  • 1.8Lifting platform
  • 1.9Biped robot
  • 1.10Changing Face
  • 1.11Carousel
  • 1.12Oscillating fan
  • 1.13Airplane
  • 1.14Unicycle
  • 1.15Auto-door
  • 1.16Dragon knight
  • 1.17Ultrasonic handheld rangefinder
  • 1.18Small flying car obstacle avoidance
  • 1.19Changing face
  • 1.20Adjustable RGB light
  • 1.21Adjustable fan
  • 1.22Photosensitive emergency light
  • 1.23Smart alarm clock
  • 1.24Light-controlled bipedal robot
  • 1.25Swimming robot avoid objects
  • 1.26Fleeing spider
  • 1.27Temperature humidity reminder
  • 1.28Temperature-controlled fan
  • 1.29Color recognition machine
  • 1.30Color-recognizing automatic door
  • 1.31Rokcer color changing light
  • 1.32Rokcer transporter
2.Preparation before class
  • 2.1 About BBC microbit
  • 2.2 Super:bit expansion board
  • 2.3 MakeCode Graphical Programming Guide
  • 2.4 MakeCode graphical API
  • 2.5 Python Programming Guide
  • 2.6 Superbit MicroPython API
  • 2.7 Notes on charging and battery use
3.Basic modeling MakeCode course
0.Basic course
  • 1.Buzzer play music
  • 2.Control RGB color
  • 3.Control all RGB lights
  • 4.Drive 270°building block servo
  • 5.Drive 180° servo
  • 6.Drive motor
A.Mobile shooter
  • 1.Cannonball shooting
  • 2.Music fortress
  • 3.APP control
  • 4.Micro:bit handle control
  • 5.WiFi camera control
B.Pretty car
  • 1.Dancer
  • 2.APP control
  • 3.Micro:bit handle control
  • 4.WiFi camera control
C.Clip robot
  • 1.Dancing and singing
  • 2.Button control clip
  • 3.APP control
  • 4.Micro:bit handle control
  • 5.WiFi camera control
D.Proficient carrier
  • 1.Dancing
  • 2.Button control shovel
  • 3.Transportation
  • 4.APP control
  • 5.Micro:bit handle control
  • 6.WiFi camera control
E.Skip car
  • 1.Dance battle
  • 2.Button control skip car
  • 3.Powerful carrier
  • 4.APP control
  • 5.Micro:bit handle control
  • 6.WiFi camera control
F.Freestyle
  • 1.Dancing and singing
  • 2.Freestyle advance
  • 3.APP control
  • 4.Micro:bit handle control
G.Spider
  • 1.Spider advance
  • 2.The dancing spider
  • 3.APP control
  • 4.Micro:bit handle control
  • 5.WiFi camera control
H.Lifting platform
  • 1.Automatic Lift
  • 2.Button control platform
  • 3.APP control
  • 4.Micro:bit handle control
I.Biped robot
  • 1.Walking
  • 2.Dancing and singing
  • 3.APP control
  • 4.Micro:bit handle control
J.Changing Face
  • 1.Changing face
  • 2.Bite the hand crocodile
  • 3.APP control
  • 4.Micro:bit handle control
K.Carousel
  • 1.Music carousel
  • 2.APP control
  • 3.Micro:bit handle control
L.Oscillating fan
  • 1.Colorful windmill
  • 2.Summer cooling artifact
  • 3.APP control
  • 4.Micro:bit handle control
M.Airplane
  • 1.Sailing Prelude
  • 2.APP control
  • 3.Micro:bit handle control
N.Unicycle
  • 1.Clumsy reptile
  • 2.APP control
  • 3.Micro:bit handle control
O.Auto-door
  • 1.Soldiers on duty
  • 2.Music door
  • 3.APP control
  • 4.Micro:bit handle control
P.Dragon knight
  • 1.Waving wings
  • 2.APP control
  • 3.Microbit handle control
4.Basic modeling Python course
0.Basic course
  • 1.Buzzer play music
  • 2.Control RGB color
  • 3.Control all RGB lights
  • 4.Drive 270° building block servo
  • 5.Drive 180° servo
  • 6.Drive motor
  • 7.Drive stepper motor
A.Mobile shooter
  • 1.Cannonball shooting
  • 2.Music fortress
  • 3.Micro:bit handle control
B.Pretty car
  • 1.Dancer
  • 2.Micro:bit handle control
C.Clip robot
  • 1.Dancing and singing
  • 2.Button control clip
  • 3.Micro:bit handle control
D.Proficient carrier
  • 1.Dancing
  • 2.Button control shovel
  • 3.Transportation
  • 4.Micro:bit handle control
E.Skip car
  • 1.Dance battle
  • 2.Button control skip car
  • 3.Powerful carrier
  • 4.Microbit handle control
F.Freestyle
  • 1.Dancing and singing
  • 2.Freestyle advance
  • 3.Micro:bit handle control
G.Spider
  • 1.Spider advance
  • 2.The dancing spider
  • 3.Micro:bit handle control
H.Lifting platform
  • 1.Automatic Lift
  • 2.Button control platform
  • 3.Micro:bit handle control
I.Biped robot
  • 1.Walking
  • 2.Dancing and singing
  • 3.Micro:bit handle control
J.Changing Face
  • 1.Changing face
  • 2.Bite the hand crocodile
  • 3.Micro:bit handle control
K.Carousel
  • 1.Music carousel
  • 2.Micro:bit handle control
L.Oscillating fan
  • 1.Colorful windmill
  • 2.Summer cooling artifact
  • 3.Micro:bit handle control
M.Airplane
  • 1.Sailing Prelude
  • 2.Micro:bit handle control
N.Unicycle
  • 1.Clumsy reptile
  • 2.Micro:bit handle control
O.Auto-door
  • 1.Soldiers on duty
  • 2.Music door
  • 3.Microbit handle control
P.Dragon knight
  • 1.Waving wings
  • 2.Micro:bit handle control
5.Sensor Advanced MakeCode coursenew
3.Sensor expansion course
  • 3.1 Avoiding car
  • 3.2 Changing Face
  • 3.3 Adjustable fan
  • 3.4 Photosensitive robot
  • 3.5 Swimming robot
  • 3.6 Spiders sense human body
  • 3.7 Temperature control fan
  • 3.8 Automatic safety door
  • 3.9 Rocker carrier car
2.Sensor basic course
  • 2.1 Hand-held range finder
  • 2.2 Adjustable RGB light
  • 2.3 Emergency light
  • 2.4 Vibrating alarm clock
  • 2.5 Infrared detection broadcast
  • 2.6Human body infrared detection broadcast
  • 2.7 Temperature and humidity broadcaster
  • 2.8 Color recognition machine
  • 2.9 Rocker control light
1.Sensor principle
  • 1.1 About ultrasonic sensors
  • 1.2 Ultrasonic ranging
  • 1.3 About potentiometers
  • 1.4 Adjust potentiometer
  • 1.5 About photosensitive sensors
  • 1.6 Read the light intensity
  • 1.7 About infrared modules
  • 1.8 Obstacle detection
  • 1.9 Introduction of module
  • 1.10 Human body detection
  • 1.11 About temperature-humidity modules
  • 1.12 Read temperature humidity
  • 1.13 About color recognition sensors
  • 1.14 Color recognition
  • 1.15 About rocker module
  • 1.16 Control rocker
6.Sensor Advanced Python coursenew
1.Sensor principle
  • 1.1 About ultrasonic sensorsnew
  • 1.2 Ultrasonic rangingnew
  • 1.3 About potentiometersnew
  • 1.4 Adjust potentiometernew
  • 1.5 About photosensitive sensorsnew
  • 1.6 Read the light intensitynew
  • 1.7 About infrared modulesnew
  • 1.8 Obstacle detectionnew
  • 1.9 About human infrared sensing modulesnew
  • 1.10 Human body detectionnew
  • 1.11 About temperature-humidity modulesnew
  • 1.12 Read temperature humiditynew
  • 1.13 About color recognition sensorsnew
  • 1.14 Color recognitionnew
  • 1.15 About rocker modulenew
  • 1.16 Control rockernew
2.Sensor basic course
  • 2.1 Hand-held range findernew
  • 2.2 Adjustable RGB lightnew
  • 2.3 Emergency lightnew
  • 2.4 Vibrating alarm clocknew
  • 2.5 Infrared detection broadcastnew
  • 2.6 Human body infrared detection broadcastnew
  • 2.7 Temperature and humidity broadcasternew
  • 2.8 Color recognition machinenew
  • 2.9 Rocker control lightnew
3.Sensor expansion course
  • 3.1 Avoiding carnew
  • 3.2 Changing Facenew
  • 3.3 Adjustable fannew
  • 3.4 Photosensitive robotnew
  • 3.5 Swimming robotnew
  • 3.6 Spiders sense human bodynew
  • 3.7 Temperature control fannew
  • 3.8 Automatic safety doornew
  • 3.9 Rocker carriernew
Download
  • APP(iOS_Android)
  • Code_PythonLibrary
  • Hardware manual
  • Bluetooth communication protocol
  • Assembly Instructions Manual
  • Makecode offline software
Download ZIP

Welcome to Building:bit Superkit repository

2.4 MakeCode graphical API

MakeCode graphical API

A. SuperBit V2

1)image-20250607153415836

Function: Set the buzzer on the expansion board to play a certain music

2)image-20250607152447358image-20250607153538685

Function: Set the servo to a certain angle

Parameters: Number: Corresponding servo interface S1-S8 Angle: Set 0-1 according to the servo angle range 80, 0-270

For example:image-20250607153327387

3)image-20250607153025401image-20250607153708962

Function: Set the servo to rotate in a certain direction at a certain speed

Parameters: Number: Corresponding servo interface S1-S8 Speed: 0-90 Direction: forward, reverse, stop

For example:image -20250607154038523

4)image-20250607154159928

Function: Set a single motor to rotate at a certain speed

Parameter: Number: Corresponding motor interface M1-M4 Speed: Set the motor rotation speed -255~255, negative value means reverse

For example:image-20250607154514020

5)image-2025 0607154608109

Function: Set two motors to rotate at a certain speed at the same time

Parameters: Number: Corresponding motor interface M1-M4 Speed: Set the motor rotation speed -255~255, negative value means reverse

For example:image-20250607154819242

6)image-20250607155025333

Function: Stop all motors

 

 

B. SuperBit V2 Digital Class

1)image-20250607160925068

Function: Temperature and humidity values ​​detected by the DHT11 sensor

Parameters: Value: Detected temperature in Celsius (℃), Fahrenheit (℉), humidity (0~100) Pin: The sensor is connected to the corresponding pin on the expansion board

For example:image-20250607161451504

2)image-20250607161521926

Function: Distance detected by ultrasonic wave

Parameters: Pin: The corresponding pin on the expansion board to which the sensor is connected

For example:image-20250607161641148

3)image-20250607165718995

Function: Set a state returned by the human infrared sensor as a judgment condition

Parameters: Pin: The corresponding pin on the expansion board to which the sensor is connected

State: The state returned by the sensor Someone is moving and No one is moving

For example:image-20250607170441833

4)image-20250607170412052

Function: Set a state returned by the infrared sensor as a judgment condition

Parameters: Pin: The corresponding pin on the expansion board to which the sensor is connected State: Obstacle and No obstacle returned by the sensor Two states

For example:image-20250607170616372

5)image-20250607170707776

Function: Set a certain state of the button as a judgment condition

Parameters: Pin: The button is connected to the corresponding pin on the expansion board State: The button is pressed and released Two states

For example:image-20250607171258204

6)image-20250607171009006

Function: Set a state of the collision detection sensor as a judgment condition

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board State: No collision and Collision returned by the sensor Two states

For example:image-20250607171719124

7)image-20250607171859286

Function: Set the vibration sensor to a certain state

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board

For example:image-20250607172020221

 

 

C. SuperBit V2 Perception category

1)image-20250607172234455

Function: The value detected by the light sensor. The lower the brightness, the larger the value returned

Parameters: Pin: The corresponding pin on the expansion board to which the sensor is connected

For example:image-20250607173139899

2)image-20250607173219014

Function: The analog value output by the sound sensor, the range is 0~1023, the louder the sound, the greater the output analog value

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board

For example:image-20250607173540780

3)image-20250607173706213

Function: The current resistance value of the potentiometer

Parameters: Pin :The sensor is connected to the corresponding pin on the expansion board

For example:image-20250607174830770

4)image-20250607174905533

Function: Set a state of the joystick as a judgment condition

Parameter: Pin: The joystick is connected to the corresponding pin on the expansion board State: The joystick has 5 states: None, Up, Down, Left, Right

For example:image-20250607175216613

 

 

D. SuperBit V2 PWM class

1)image-20250609142843837

Function: Set the buzzer to be connected to a certain pin

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board

For example:image-20250609143236999

2)image-20250609143322518

Function: Set the vibration motor to vibrate at a certain speed

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board Speed: Vibration speed, range 0-1023

For example:image-20250609143503150

3)image-20250609143543564

Function: Set the R, G, and B values of the RGB light to change the color

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board Red, green, blue: RGB value of the light, range 0-255

For example:image-20250609143838062

4)image-20250609143928540

Function: Set the color of the RGB light

Parameters: Pin: The sensor is connected to the corresponding pin on the expansion board Color display: Off and several fixed colors

For example:image-20250609144102550

 

 

E. Neopixel

1)image-20250609152438753

Function: Create and initialize a light strip

Parameters: Pin: The pin connected to the light strip Number of beads: The number of beads waiting to be connected Mode: The mode used by the light beads, including RGB (GRB order), RGB + W, RGB (RGB order)

For example:image-20250609153249105

2)image-20250609153635140

Function: Select a range from the color light strip, starting from a certain light, and select a certain number of lights.

Parameters: Pixels: starting position of the light Length: the number of selected lights For example:image-20250609154032474

3)image-20250609154159149

Function: let the light strip present a gradient color effect in a certain hue range

Parameters: Hue: range 0-360 (complete color circle)

For example:image-20250609154426788

4)image-20250609154520297

Function: Let the light strip present a certain color

Parameter: Color: Several fixed colors, such as red, orange, yellow, violet, etc.

For example:image-20250609154811452

5)image-20250609154738650

Function: Display the value on the LED light strip in the form of a bar graph.

Parameters: Value: the currently displayed value Maximum value: the maximum value that can be set. When set to this maximum value, all the lamp beads will light up

For example:

image-20250609160617004

6)image-20250609163501208

Function: Refresh the display of the light strip

7)image-20250609163541920

Function: Clear the display of the light strip, that is, turn off the light

8)image-20250609163704907

Function: Convert hue, saturation, and brightness values ​​to RGB colors

Parameters: Hue: Range 0-360 Saturation: Range 0-99 Brightness: Range 0-99

For example: image-20250609164305548

9)image-20250609165119151

Function: Control the light strip to move at a certain pixel. Move the pixels of the light strip forward by a specified number of pixels, and use "0" (i.e. closed pixels) to clear the position left at the end

Prerequisite: After use, you need to call Refresh Display to display the changes

Parameters: Offset: The pixels moved by the light strip

For example: image-20250609165602853

10)image-20250609165630041

Function: Control the light strip to circulate with a certain pixel, that is, move the front pixel to the back

Prerequisite: After use, you need to call Refresh Display To display the changes

Parameters: Offset: The pixel that the light strip moves

For example:image-20250609165843549

11)image-20250609165948924

Function: Set the brightness of the white light at a certain pixel position

Prerequisite: Only applicable to RGBW lamp beads (not ordinary RGB lamp beads). After use, you also need to call Refresh Display to display the changes

Parameters: Pixel: The number of lamp beads to be set (from 0 Start counting) Brightness: Range 0-255

For example:image-20250609171639512

12)image-20250609171826229

Function: Set the lamp bead at a certain pixel position on the light strip to display a certain color

Prerequisite: After use, you also need to call Refresh Display to display the changes

Parameters: Pixel: The number of lamp beads to be set (from 0 Start counting) Color: The color to be displayed on the light strip

For example:image-20250609172104669

13)image-20250609172228452

Function: Get the number of lamp beads on the light strip

14)image-20250609172557068

Function: Set the brightness of the light strip

Parameters: Brightness: Range 0-255, the larger the value, the brighter it is

15)image-2025060 9174313377

Function: Reduce the brightness of the light strip

16)image-20250609174540040

Function: Estimate the current consumed by the current lighting configuration

17)image-20250609174640408

Function: Set the number of lamp beads per row of the light strip, the direction of the entire matrix, and the arrangement method

Prerequisite: It is a matrix-shaped light strip or light board

Parameters:

width: The number of lamp beads per row rotation: Rotation method 0-NeoRotation.Rotate0 (no rotation), 1-NeoRotation.Rotate90 (90 degrees clockwise), 2-NeoRotation.Rotate180 (upside down), 3-NeoRotation.Rotate270 (270 degrees clockwise) chain: arrangement 0-NeoMatrixChain.None (normal arrangement), 1-NeoMatrixChain.ZZ (Z-shaped arrangement)

18)image-20250609182102285

Function: Set the color of the lamp beads at the specific coordinate position on the matrix-shaped light strip

Prerequisite: It is a matrix-shaped light strip or light board

Parameters: x, y: horizontal and vertical coordinates Color: The color displayed by the lamp beads

MakeCode Graphical Programming Guide
Python Programming Guide

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/中文