Welcome to Tiny:bit Pro repository
2.9 Handwriting digit recognition
2.9 Handwriting digit recognition
2.9 Handwriting digit recognition1. Learning Objective2. Preparation for class3. Programming Methods4. Blocks5. Code6. Download code7. Experimental phenomena
1. Learning Objective
In this course. We will learn that handwritten number recognition by K210 vision module. When the number is recognized, the Micro:bit led dot matrix displays the number, which can recognize the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
2. Preparation for class
- Remove the TF card from the k210 vision module and insert it into the card reader.
- Plug the card reader into the computer, and wait for the computer to recognize the USB disk.
- Then, enter the TF card U disk. You will see following content.
- Go to the k210 folder, find the 2.9_3.8_mnist.py file from the folder and copy it to the root directory.
Delete the original main.py file.
Then, re-name the 2.9_3.8_mnist.py file file as the main.py file.
- After renaming, 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. and enter the online programming interface.
Copy the package URL: https://github.com/YahboomTechnology/K210-Module.git to the input field, click confirm to add the package, after that you can use the blocks of K210 vision module package.
4. Blocks
5. Code
6. Download code
Connect the Micro:bit board to the computer via Micro USB cable, the computer will pop up a USB stick.
Then, select the microbit-mint.hex file 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, wait for the screen to display the camera image.
After displaying the screen, the camera will shoot their own handwritten numbers or printed numbers, handwritten numbers need to be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 these numbers, can not identify other numbers. Recognition of the top left corner of the screen will display the current recognition of the number, Micro:bit led dot matrix display recognition of the number.