Image-Recognition-Equipped Study Lamp Guides Students in Their Academic Pursuits
It's a regular problem ain't it? You're knuckling down, studying your socks off, when suddenly, there's a notification on your phone and before you know it, three hours have passed. All you've achieved is a whole lotta scrolling, but no actual studying. Well, [Makestreme] has got the solution for ya with their AI study lamp. This little beauty changes color from warm white to a fiery red as a gentle yet firm reminder to focus back on the books. Check out the demo video below to see it in action.
The project is quite straightforward: it consists of an ESP-32c3, a WS2812b addressable RGB LED strip, and a Grove Vision AI module. The Grove Vision AI module, you ask? That's a smart cookie, 'cause it makes it super easy to integrate AI into your projects, what with the pre-trained models available from Seeed's Sensecraft AI. Guess what? Senscraft had a pre-trained model specifically for phone recognition, works like a charm with the Grove Vision module. So, it didn't take [Makestreme] away from their studies for too long. If you fancy replicating the project, they've been kind enough to share the code on our website.
The camera for this setup is placed above [Makestreme]'s desk to keep tabs on phone usage. The lamp itself is made using things they had lying around. Fancy making your lamp look more chic? Why not 3D print it or whip up something classy out of plywood? If you ain't swat-studying, consider using the Grove Vision module to build a spooky clock instead.
Now, let's talk a bit about how to build this little genius. Here's a rundown to help you construct this smart lighting system.
Components Needed
- ESP-32c3 Microcontroller: Controls the LED strip and integrates AI functionality.
- WS2812b LED Strip: Display changes based on phone detection.
- Grove Vision AI Module: Provides image recognition and phone detection capabilities.
- Power Supply: Powers the ESP-32c3 and LED strip.
- Breadboard and Jumper Wires: For connections.
Building the AI Study Lamp
1. Hardware Setup
- Connect the WS2812b LED strip to the ESP-32c3. A single data line should suffice and can be connected to any GPIO pin on the ESP-32c3.
- Attach the Grove Vision AI module to the ESP-32c3. Make sure the Grove module is compatible with your ESP-32c3 board.
- Power up the setup using a suitable power supply.
2. Software Setup
- Install necessary libraries for the ESP-32c3 in your Arduino IDE or preferred development environment (e.g., FastLED for WS2812b).
- Use the Sensecraft AI library for integrating image recognition capabilities from the Grove Vision AI module. This may involve setting up an API or SDK from Sensecraft AI.
- Write code that detects phone presence using the AI module. Trigger a color change on the WS2812b LED strip when a phone is detected.
3. Sample Code
Here's a basic code structure to get you rolling. This example assumes you're using FastLED for the LED strip and a hypothetical library for the Grove Vision AI module.
```cpp #include
// Define constants #define LED_PIN 2 // GPIO pin used for WS2812b #define COLOR_ORDER GRB #define CHIPSET WS2812B #define NUM_LEDS 30 // Number of LEDs in the strip
CRGB leds[NUM_LEDS];
// Function to detect phone using AI module bool detectPhone() { // Code to integrate with Sensecraft AI goes here // For demonstration, assume phone detection is integrated return true; // Replace with actual detection logic }
void setup() { Serial.begin(115200); FastLED.addLeds
void loop() { if (detectPhone()) { // Change LED color to red when phone is detected for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB(255, 0, 0); } } else { // Change LED color to warm white when no phone is detected for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB(255, 255, 150); // Warm white } } FastLED.show(); delay(1000); // Update every second } ```
4. Integrate with Sensecraft AI
- Incorporate phone detection algorithm using the Sensecraft AI SDK or API. This may involve training a model to recognize phone images or using a pre-trained model.
5. Final Assembly
- Once all components are connected and the code is uploaded, assemble the lamp structure. This could involve 3D printing a casing or using materials like cardboard or wood to create a stable base and neck for the lamp.
6. Testing
- Test the lamp by placing it near a study area and verifying that the LED strip changes color when a phone is detected.
The Makestreme project incorporates smart-home-devices, such as the Grove Vision AI module, to create an AI study lamp. This lamp, controlled by an ESP-32c3 microcontroller and powered by a suitable power supply, uses a WS2812b LED strip that changes color based on phone detection. To build this project, you'll need to hardware setup the components, install necessary libraries for the ESP-32c3, use the Sensecraft AI library for image recognition, write code that detects phone presence, and finally assemble the lamp structure. If you're interested in exploring more gadgets and technology, consider 3D printing a chic casing for the lamp or building a spooky clock using the Grove Vision module.