Purpose
This project is based on the AI Lens, which is aimed to protect our personal belongings from missing.
Bricks Assembly
Components list:
Please download the io. file if you have Lego studio: The-AI-Lens-Burglar-proof-Device.io
After assembly, connect with Nezha breakout board, the Rainbow LED and the AI lens kit.
Hardware connections
Software Programm
Click “Advanced” in the MakeCode 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.
For programming, we need to add a package: click “Extensions” at the bottom of the MakeCode drawer and search with “PlanetX” 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.
Code:
Link: https://makecode.microbit.org/_H4HiAjhfpKox
Result
Press button A on the micro:bit to start the AI lens by learning the object, the Rainbow LED would light up if the object is taken away.