Anyone Can Use AI
Adding artificial intelligence (AI) to your projects can significantly enhance their creativity and functionality. In this article, we explore how to integrate vision recognition AI into a simple micro:bit project using your webcam and free web-based software. By training an AI model to recognize various objects, such as city vehicles, you can program the micro:bit to respond dynamically based on what it sees.
The first AI project involves training the AI to recognize different types of city vehicles and associating unique sounds with each one. Using cardboard models of cars, users can follow along to create their own vehicles or draw inspiration from other sources like Kathy Ceceri’s book “Making Simple Robots.” AI Robots, a web tool developed by Steamlabs, serves as a bridge between the micro:bit and the cloud-based pre-trained AI model, enabling the micro:bit to access AI capabilities without overwhelming its processing power.
To train the AI engine, Google’s Teachable Machine is utilized, allowing users to create prediction models for image recognition. The process involves providing diverse examples of each class of object for the AI to learn from. By uploading multiple photos of various angles and perspectives, the AI can develop a comprehensive understanding of the objects it’s meant to recognize. After training the model, the next step involves coding the micro:bit to respond to the AI’s predictions by playing specific sounds corresponding to the recognized objects.
In the coding phase, a MakeCode application is built to facilitate communication between the micro:bit and the computer through a USB cable. Serial data received from the AI Robots site is processed, allowing the micro:bit to react accordingly to the recognized objects. Each class identified triggers a specific action programmed into the micro:bit, such as playing distinctive sounds for different vehicles. With careful coding, users can customize the response of the micro:bit to match the characteristics of each recognized object.
Finally, by connecting the trained AI model to the micro:bit, the project comes to life as the micro:bit accurately identifies and responds to objects captured by the webcam. Users can adjust the AI’s parameters for accuracy and decision-making thresholds, ensuring reliable performance. This project demonstrates the exciting possibilities of integrating AI into micro:bit projects, offering endless opportunities for creativity and innovation.
Read more: Anyone Can Use AI