yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Tiny:bit Robot Car📖
1.First Trial
  • 1.1 First Trial
  • 1.2 Bluetooth APP manual matching tutorial
2.Preparation before programming
About Graphical
  • 1.Online programming
  • 2.Offline programming
About Python
  • 1.Python Programming
  • 2.Import Tiny:bit library
  • 3.Tiny:bit MicroPython API
Download program
  • How to download program
3.Lighting with Tiny bit
  • 3.1 LED light
  • 3.2 RGB Searching light
  • 3.3 RGB light exchange lighting
  • 3.4 LED light exchange lighting
  • 3.5 Breathing light
4.Singing withTiny bit
  • 4.1 Playing internal music
  • 4.2 Play Merry Christma with lights
5.Running with Tiny bit
  • 5.1 Advance
  • 5.2 CarRun
  • 5.3 Control speed
  • 5.4 Dancer
  • 5.5 Route plan
6.Playing with Tiny bit
  • 6.1 Measuring worker
  • 6.2 Distance control light
  • 6.3 Ultrasonic obstacle avoidance
  • 6.4 Magic hand
  • 6.6 Playing black paino
  • 6.7 Tracking
  • 6.8 Voice control light
  • 6.9 Coward
  • 6.10 Musical rhythm
  • 6.11 Listener
  • 6.12 Wobble when touch
  • 6.13 Spinning top
  • 6.14 Frog beating
  • 6.15 Adventure car
7.Interacting with Tiny bit
  • 7.1 IR Control
  • 7.2 Android bluetooth APP control
  • 7.3 iOS bluetooth APP control
  • 7.4 Handle remote control
  • 7.5 WiFi camera control(Tinybit Plus)
8.Charging and battery
  • Charging and Battery
9.Python course
Basic course
  • 1.Hello,World
  • 2.Display built-in image
  • 3.Display custom image
  • 4.Display custom animation
  • 5.Button game
  • 6.Play built-in music
  • 7.Car Headlights
  • 8.Drive Motor
  • 9.Tracking
  • 10.Sound sensor
  • 11.Ultrasonic
  • 12.IR control
  • 13.LED light
Robot course
  • 1.Advance
  • 2.CarRun
  • 3.Control speed
  • 4.Route plan
  • 5.Distance control light
  • 6.Ultrasonic avoid
  • 7.Tracking
  • 8.Voice control light
  • 9.Listener
  • 10.IR control
  • 11.Handle control(option)
10.AI vision course(For Tiny:bit Plus)new
  • 1. Cat(dog) detection
  • 2. Color recognition
  • 3. QR code instructions
  • 4. Person Recognition
  • 5. Face Detection
  • 6. Color Follows
  • 7. Face following
Download
  • APP(iOS_Android)
  • Instruction_Manual
  • Code
  • Makecode offline software
  • Bluetooth Remote Control with ultrasonic V2.hex
  • Bluetooth Remote ControlV1.5.hex
  • Bluetooth Remote Control with ultrasonicV1.5.hex
  • IR control V2.hex
  • IR control V1.5.hex
  • Tiny:bit V1 MicroPython Library
  • Tiny:bit V2 MicroPython Library
  • Tiny:bit MicroPython API
  • Bluetooth communication protocol
Download ZIP
FAQ
  • 1、Can't open MakeCode software normally.
  • 2、Tiny:bit Expansion pack infrared cannot switch French

Welcome to Tiny:bit Robot Car repository

当製品の日本語版マニュアル資料は、こちらからご取得ください。

3.Tiny:bit MicroPython API

Yahboom Tiny:bit MicroPython API

Input this code to import Yahboom Tiny:bit Micropython library:import tinybit

 

1、Car advance  tinybit.car_HeadRGB(a, b, c) 

Description of Parameter:

a is red value,range is 0-255.

b is green value,range is 0-255.

c is blue value,range is 0-255.

Eg: tinybit.car_HeadRGB(255, 255, 255)  //The RGB search light will become white

 

2、Car advance

method1:  tinybit.car_run(s)

method2:  tinybit.car_run(a, b)

Function: Control the car advance

One parameter:

A single parameter s, set the speed of the two motors of the car, range: 0 ~ 255

Two parameters: 

a is left motor speed,range is 0-255.

b is right motor speed,range is 0-255.

Eg1: tinybit.car_run(255)  // The car will run with 255 speed

Eg2: tinybit.car_run(255, 255)  // The car will run with 255 speed

  

3、Car back  

     method1:  tinybit.car_back(a)

method2:  tinybit.car_back(a, b)

Function: Control the car back

One parameter:

A single parameter s is the speed of the two motors of the car, range: 0 ~ 255

Two parameters: 

a is left motor speed,range is 0-255.

b is right motor speed,range is 0-255.

Eg1: tinybit.car_back(255)  // The car will back with 255 speed

Eg2: tinybit.car_back(255, 255)  //The car will back with 255 speed

 

4、Car turn left  tinybit.car_left(a)

Function: Control the car turn left

Parameter:

a is the speed of right motor of the car, range: 0 ~ 255

!Note: car turn left is left wheel stop and right wheel advance,so we only input right speed.

Eg: tinybit.car_left(255)  // The car will turn left with 255 speed

 

5、Car turn right  tinybit.car_right(a)

Function: Control the car turn right

Parameter:

a is the speed of left motor of the car, range: 0 ~ 255

!Note: car turn left is right wheel stop and left wheel advance,so we only input left speed.

Eg: tinybit.car_right(255)  // The car will turn right with 255 speed

 

6、Car spin left  

method1:  tinybit.car_spinleft(s)

method2:  tinybit.car_spinleft(a,b)

Function: Control the car spin left

One parameter:

A single parameter s is the speed of the two motors of the car, range: 0 ~ 255

Two parameters: 

a is left motor speed,range is 0-255.

b is right motor speed,range is 0-255.

Eg1: tinybit.car_spinleft(255)  // The car will spin left with 255 speed

Eg2: tinybit.car_spinleft(255, 255)  //The car will spin right with 255 speed

 

7、Car spin right  

method1:  tinybit.car_spinright(s)

method2:  tinybit.car_spinright(a,b)

Function: Control the car spin right

One parameter:

A single parameter s is the speed of the two motors of the car, range: 0 ~ 255

Two parameters: 

a is left motor speed,range is 0-255.

b is right motor speed,range is 0-255.

Eg1: tinybit.car_spinright(255)  // The car will spin right with 255 speed

Eg2: tinybit.car_spinright(255, 255)  //The car will spin right with 255 speed

 

8、Car stop  tinybit.car_stop()

Function: Control the car stop

 

9、RGB search light   tinybit.setMotorPWM(a, b, c)

Function: Set motor PWM value

Parameters:

a: the left motor speed (-255 ~ 255), positive number is forward, negative number is backward, zero is stop

b: the right motor speed (-255 ~ 255), positive number is forward, negative number is backward, zero is stop

c: delay time (ms)

Eg: tinybit.car_setMotorPWM(255, -255, 1000)  //Left motor rotates forward, right motor rotates reverse 1000ms with 255 speed.

 

10、Ultrasonic module return distance  tinybit.ultrasonic()

Function: returns the current distance detected by the ultrasonic module(cm).

 

11、Left tracking sensor  tinybit.traking_sensor_L()

Return value: if black lines are detected returns true, if white lines are detected return false.

 

12、Right tracking sensor   tinybit.traking_sensor_R()

Return value: if black lines are detected returns true, if white lines are detected return false.

 

13、Voice sensor   tinybit.getVoicedata()

Function: Get the value of the sound sensor

 

14、IR control   tinybit.init_IR(a)

Function: Initialize infrared remote receiver

Parameter:

a is pin of the infrared receiver

!Note: For building:bit, we need to select pin8

Eg: tinybit.init_IR(pin8)

 

15、Return button value of IR controller  tinybit.get_IR(IR_pin)

Parameter:

a is pin of the infrared receiver

!Note: For building:bit, we need to select pin8

Eg: tinybit.get_IR(pin8)

image.png 

16、Input this code to import Yahboom Tiny:bit Micropython library:import ghandle

 

ghandle.B1_is_pressed()

Function: Key B1 (red), press to return to True, release to return to False

 

ghandle.B2_is_pressed()

Function: Key B2 (green), press to return to True, release to return to False

 

ghandle.B3_is_pressed()

Function: Key B3 (blue), press to return to True, release to return to False

 

ghandle.B4_is_pressed()

Function: Key B4 (yellow), press to return to True, release to return to False

 

ghandle.rocker(state)

Function: Detect the joystick direction, if it is consistent with the parameter return True , if it is inconsistent with the parameter return False

Parameters: state indicates the status of the rocker

ghandle.up --- rocker up

ghandle.down --- rocker down

ghandle.left --- rocker left

ghandle.right --- rocker right 

ghandle.pressed --- rocker be pressed

ghandle.noState --- no any operation

 

ghandle.get_value_x()

Function: Returns the analog value of the X channel of the rocker. The value will change when moving left and right. It increases to the left and decreases to the right.

 

ghandle.get_value_y()

Function: Returns the analog value of the Y channel of the rocker. The value will change when moving up and down. It increases to the down and decreases to the up.

 


Import Tiny:bit library
How to download program

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

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文