Introduction
This is a simple balls classifier device that could recognize the color of the ball and has them classified automatically.
Materials required
Nezha Inventor’s kit for micro:bit
I also get some bricks myself which are not included in the kits.
Build-up
Building steps:
After building, get it connected with the Nezha breakout board, the servos and the Smart AI lens as the following picture indicates:
Hardware connections
Software Programm
Step 1
Click “Advanced” in the MakeCode drawer to see more choices
For programming, we need to add a package: click “Extensions” at the bottom of the MakeCode drawer and search with “nezha” in the dialogue box to download it.
Notice: If you met a tip indicating that some codebases would be deleted due to incompatibility, you may continue as the tips say or create a new project in the menu.
Step 2
Program:
Link: https://makecode.microbit.org/_8Wh4uEgpL9Mv
Result
The balls get classified in accordance with their colors.