Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Introduction

This is a simple balls classifier device that could recognize the color of the ball and has them classified automatically.

Make A Balls Classifier with Smart AI Lens

Materials required

Nezha Inventor’s kit for micro:bit

ELECFREAKS Smart AI Lens kit

I also get some bricks myself which are not included in the kits.

Build-up

Building steps:

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

Make A Balls Classifier with Smart AI Lens

After building, get it connected with the Nezha breakout board, the servos and the Smart AI lens as the following picture indicates:

Make A Balls Classifier with Smart AI Lens

Hardware connections

Make A Balls Classifier with Smart AI Lens

Software Programm

Step 1

Click "Advanced" in the MakeCode drawer to see more choices

Make A Balls Classifier with Smart AI Lens

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.

Make A Balls Classifier with Smart AI Lens

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:

Make A Balls Classifier with Smart AI Lens

Link: https://makecode.microbit.org/_8Wh4uEgpL9Mv

Result

The balls get classified in accordance with their colors.