By- Rhythm
- Introduction
- Model Training & Downloading (Teachable Machines)
- Making Arduino Sketch
- Writing Python Script
- Collecting & Assembling Hardware
- Loading The Code to Arduino & Testing
- Conclusion
The system utilizes a machine learning model trained with a Teachable Machine to analyze live video feeds from a laptop camera. By interpreting facial expressions and eye movement patterns, the model determines whether the student is attentive. The Arduino microcontroller interfaces with the model's predictions and controls hardware components. Upon detecting inattentiveness, the system triggers a buzzer to alert the student or the instructor, serving as a gentle reminder. Conversely, when the student is deemed attentive, an LED is activated, providing positive reinforcement. This documentation will guide you through the setup process, explain the necessary components, and offer insights into the software and hardware integration. Whether you're a student, educator, or hobbyist, this project is an engaging exploration of machine learning and hardware interfacing.
Visual Studio Code is a free, lightweight code editor with powerful writing and debugging features. It supports various programming languages and extensions, making it a popular choice among developers.
Teachable Machines is a simple online tool by Google that helps you train your computer to recognize and respond to different sounds, images, or poses without coding.
Arduino IDE is a software platform that allows you to write, upload, and run code on Arduino microcontrollers, enabling you to create interactive electronic projects without advanced programming knowledge.
We will use the following steps to build a model:
- Go to the Teachable Machines website.
- Select the type of project you want to create: Image.
- Collect images for each class you want to recognize and upload them.
- Label each class or category in your dataset.
- Click on the "Train Model" button to let Teachable Machines train a model based on your data.
- After training, you can test your model using the built-in testing interface to see how well it recognizes new examples.
- Once satisfied with the performance, export your model. Teachable Machines provides options to export models for TensorFlow.js, TensorFlow Lite, or as a link to use in your projects.
After making the model, our next step will be writing an Arduino script for our Arduino Uno which can take serial commands and move motors accordingly.
Now our next step is making a Python script. Below is the script and its explanations:
- Arduino Uno
- Breadboard
- Jumper Wires
- LED
- Buzzer
- First, put an LED & buzzer on the breadboard.
- Then connect wire with GND of Arduino to straightly connected breadboard pins.
- Connect 2 jumper wires to the line and connect to the negative terminal of both LED and buzzer.
- Connect LED positive to Arduino pin 4 & buzzer to Arduino pin 5.
Now all the important parts are done. Just connect the cable to Arduino and load the Arduino sketch into the Uno, then start the Python script and test.
WhatsApp.Video.2024-06-05.at.16.25.33_90221f64.mp4
Now you can make this Attention Detection Buzzer by yourself. Try adding more things to it, play with it, and discover where you can use it.
Thank You,
Rhythm