yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Tiny:bit Pro📖
0.First Trial and Assemble
  • 1.0 Installation Video
  • 1.1 First Trial
1.Preparation before programming
  • 1.Online programming
  • 2.Offline programming
  • 3.Python Programming
  • 4.Import Tiny:bit library
  • 5.Tiny:bit MicroPython API
  • 6.How to download program
2.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
3.Singing withTiny bit
  • 4.1 Playing internal music
  • 4.2 Play Merry Christma with lights
4.Running with Tiny bit
  • 5.1 Advance
  • 5.2 CarRun
  • 5.3 Control speed
  • 5.4 Dancer
  • 5.5 Route plan
5.Playing with Tiny bit
  • 6.1 Measuring worker
  • 6.2 Distance control light
  • 6.3 Ultrasonic obstacle avoidanc
  • 6.4 Magic hand
  • 6.5 Radar detector
  • 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
6.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.MicroPython 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
8.AI vision course
1. Preparation
  • 3.12.1 K210 Identification Information and Adjust
  • 1. K210 module download code
  • 1.2 Parsing K210 protocol data
  • 1.3 microbit connection use
2. Basic course
  • 2.1 Color recognition
  • 2.2 Barcode recognition
  • 2.3 QR code recognition
  • 2.4 Machine code recognition
  • 2.5 Object recognition
  • 2.6 Learning and classification
  • 2.7 Mask warning
  • 2.8 Facial recognition
  • 2.9 Handwriting digit recognition
3. Tinybit course
  • 3.1 Color response
  • 3.2 Barcode recognition
  • 3.3 QR code recognition
  • 3.4 Object detection
  • 3.5 Signposting action
  • 3.6 Mask Testing
  • 3.7 Face Detection
  • 3.8 Handwritten digital control
  • 3.9 Color patrol
  • 3.10 Machine code following
  • 3.11 Color tracking
  • 3.12.2 Autopilot
9.Charging and Battery
  • Charging and Battery
Download
  • APP(Android/iOS)
  • Code
  • Manual
  • Hardware Info
  • APP communication protocol
  • RoadSign File
  • Bluetooth Remote Control with ultrasonic V2.hex
  • Bluetooth Remote ControlV1.5.hex
  • Bluetooth Remote Control with ultrasonicV1.5.hex
  • IR control V1.5.hex
  • IR control V1.5.hex
  • IR control V2.hex
  • Tiny:bit V1 MicroPython Library
  • Tiny:bit V2 MicroPython Library
  • Tiny:bit MicroPython API
Download ZIP

Welcome to Tiny:bit Pro repository

3.12.2 Autopilot

Tinybit Pro autopilot

Tinybit Pro autopilot1. Learning objectives2.Preparation for class3.Programming Methods4.Blocks5. Some important source code analysis5.1 Open the source code5.2 Partial source code analysis6. Download code7.Experimental phenomena8.Note

1. Learning objectives

In this course, we mainly learn how to let Tiny:bit Pro complete the recognition of different road signs while using the line tracking sensor to track the line.

2.Preparation for class

2.1 Remove the TF card from the k210 vision module and insert it into the card reader.

01

2.2 Plug the card reader into the computer, and wait for the computer to recognize the USB disk.

02

2.3 Then, enter the TF card. You will see following content.

03

2.4 Go to the k210 folder, find the 3.12_Autopilot.py file and tinybit_AI.kmodel file from the folder and copy it to the root directory.

04

05

2.5 Delete the original main.py file. Then, re-name the 3.12_Autopilot.py file as the main file.

07

2.6 After re-name, pull out the card reader, remove the TF card and insert it back into the k210 vision module.

3.Programming Methods

Online Programming: First, copy this URL https://makecode.microbit.org/ and open it in your computer browser to enter the online programming interface. Click on "Extensions", copy the software package URL: https://github.com/YahboomTechnology/K210-Module.git to the input field, click "Confirm to add the software package", then click "Extensions" again, copy the software package URL: https://github.com/YahboomTechnology/Tiny-bitLib to the input field, click "Confirm to add the software package", and finally you can use the K210 vision module software package and the building blocks of Tinybit.

Offline Programming: First, install the MakeCode offline programming software. After installation, open it and enter the offline programming interface. Click on "Extensions", copy the software package URL: https://github.com/YahboomTechnology/K210-Module.git into the input field, click "Confirm" to add the software package. Then click "Extensions" again, copy the software package URL: https://github.com/YahboomTechnology/Tiny-bitLib into the input field, and click "Confirm" to add the software package. Finally, you can use the K210 Vision Module software package and the building blocks of Tinybit.

4.Blocks

08

11

11

11

12

13

5. Some important source code analysis

5.1 Open the source code

This tutorial only shows a small part of the source code, not all the source code. If you want to see all the source code of this tutorial, first open the makecode offline software or an online programming website. Take the online programming website as an example.

 

 

5.2 Partial source code analysis

 

Function Analysis

  • Deal_data: Analyze the data of different road signs recognized by k210
  • Track_line: normal line patrol movement, if no road signs are recognized, this function is usually called for movement
  • Reverse_parking_no1: When the k210 recognizes the number 1, it drives the car back into the No. 1 parking lot
  • Car_outbound: The storage is reversed successfully, stop for 2 seconds, then go out of the warehouse, and then carry out the process of patrolling the line after leaving the warehouse
  • Road_sign_left: After the k210 recognizes the road sign of the left turn, it will perform the processing of the left turn priority line inspection
  • Reverse_parking_no2: This is when the k210 recognizes the number 2, the car is driven back into the No. 2 parking lot
  • Car_outbound_track: This is the processing of line inspection after leaving the warehouse, and it will return to normal line inspection after a period of time
  • Road_sign_right: After the k210 recognizes the right-turn road sign, it will perform right-turn priority patrol processing
  • Whistle: k210: recognize the horn icon, drive the car to whistle
  • Road_sign_speedlimit: Recognize the speed limit sign, drive the car to enter the speed limit movement

The flow chart of this program, as shown below 17

 

6. Download code

Connect the Micro:bit board to the computer via microusb cable, the computer will pop up a USB stick.

Then, select the k210_Autopilot.hex code and right click to send it to the Micro:bit U disk.

Wait until sending is complete and unplug the Micro:bit usb cable. Plug the Micro:bit board into the car.

7.Experimental phenomena

After starting the car, the car will move forward along the black line on the map. When the camera recognizes the road sign, the corresponding path planning movement will appear.

  1. When the speed limit sign is recognized, the car will follow the line at a speed that does not exceed the speed limit sign.

25

  1. When the speed limit sign is recognized, the car will return to the normal line patrol movement.

19

  1. When a turn left/right sign is recognized, the car will make a priority turn left/right tracking movement.

20

22

  1. When the honk is recognized, the car will whistle.

21

  1. Recognize traffic lights, red lights will stop, green lights will continue to move forward.

23

  1. Recognize parking No. 1 and parking No. 2.

    When car recognizes parking No. 1, it will enter parking No. 1;

    When car recognizes parking No. 2, it will enter parking No. 2; after 2 seconds, the car will come out and continue to tracking.

24

27

8.Note

  1. The location of the road sign on the map, as shown below. 26
  2. Please make sure the battery is fully charged, otherwise it will not work normally
  3. If the road signs cannot be recognized, you can adjust the bracket of the k210 or the distance of the road signs
  4. You must use the road sign model provided by Yahboom, refer to the pictures in the road sign folder, other road signs cannot be recognized.
  5. Under normal circumstances, the motor is very smooth. If the motor freezes and the resistance is large, these conditions indicate that the motor is broken.
  6. The map must be kept clean without too many stains, otherwise it will affect the normal use
  7. When tracking, the environment should not be too bright or too dark.
Color tracking
Charging and Battery

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