Skip to main content

Case 09 AI Anti-Theft Bar

Introduction

The purpose of this lesson is to guide students to use the Nezha Inventor‘s Kit V2 and the AI Accessories Pack to build an AI item security bar system. Through the feature learning function of the AI lens, students will learn about the application of Artificial Intelligence (AI) in securing items. Students will learn how to build an intelligent anti-theft system that recognizes specific items and triggers an alarm and flashing lights when the item leaves the camera's field of view, improving their STEAM (Science, Technology, Engineering, Arts, and Mathematics) skills, and fostering problem-solving and creativity.

Teaching Objectives

  • Understand the basic concepts and applications of Artificial Intelligence.
  • Master the basic use of the Nezha Inventor's Kit V2 and the AI Accessories Pack.
  • Learn to build an AI item security bar system involving feature learning functionality.
  • Improve teamwork and creative problem-solving skills.

Teaching Preparation

NEZHA Inventor's Kit V2 For micro:bit

AI Accessories Kit

Computer

Teaching Process

Introduction

Teachers can guide students to think about the following questions: What are the applications of feature learning technology in their lives?

Hello everyone, today we are going to enter the wonderful world of Artificial Intelligence and learn how to make an amazing AI item security bar system using the Nezha Inventor's Kit V2 and AI Accessories Pack. Have you ever thought of having a camera that recognizes specific items and triggers an alarm and flashing light when the item is removed? That's what we're going to tackle today, so let's get started with this creative and technically challenging project.

Exploration

Break out into groups and have students think about how they can use an AI lens to create an AI item security fence.

  • How can feature learning techniques be applied to an item security system?
  • How to use Nezha Inventor's Kit V2 and AI Accessories Pack to build an AI Item Theft Bar System?
  • How to use a feature learning function to make the camera recognize specific items?

Exploration

Work in groups and follow your own design plan to create an AI item security fence device using building block materials.

Follow your own design plan and use the building block materials to create an AI item security fence device.

Illustrate

Building Steps

Completion of construction

Hardware Connection

Connect the Rainbow light ring to the J1 port and the AI lens to the IIC port of the NEZHA expansion board.

Software Connection

Go to makecode

Create a new project

Click extensions

Search for planetx in the bar to add the extended library of it.

Write the program

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

You can also download the code directly here:

Teamwork and Presentation

Students are divided into small groups and work together to create and program cases.

Students are encouraged to cooperate, communicate and share their experiences with each other.

Each group has the opportunity to present the cases they have produced to the other groups.

Sample case effect

Through the feature learning function of the AI lens, it learns about a specific item, and when this item leaves the camera's field of view, the camera will sound an alarm and flash a light.

Reflection

Sharing in groups allows students in each group to share their production process and insights, summarize the problems and solutions they encountered, and evaluate their strengths and weaknesses.