Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
meilily LiMengduSeeed
Published © MIT

SmartBreeze Face-Tracking Fan Powered by Vision AI + ESP32

Imagine a fan that tracks your every move, ensuring a cool and refreshing breeze is always directed towards you.

BeginnerFull instructions provided3 hours982

Things used in this project

Hardware components

Grove Vision AI Module V2
Seeed Studio Grove Vision AI Module V2
×1
Seeed Studio Seeed OV5647-62 FOV Camera Module for Raspberry Pi
×1
Seeed Studio XIAO ESP32S3
Seeed Studio XIAO ESP32S3
×1
Seeed Studio XIAO Expansion Board
Seeed Studio XIAO Expansion Board
×1
Servo Module (Generic)
×1

Software apps and online services

SenseCraft AI
Seeed Studio SenseCraft AI
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

System Schematics

Code

FaceRecognitionFan.ino

C/C++
#include <Seeed_Arduino_SSCMA.h>
SSCMA Infer;

void stop_rotate(void)
{
    digitalWrite(D6, HIGH);
    delayMicroseconds(1500);
    digitalWrite(D6, LOW);
}

void servo_rotate(int rtime, bool revers = false)
{
    uint32_t sleep;
    if (revers)
    {
        sleep = 2500;
    }
    else
    {
        sleep = 500;
    }
    digitalWrite(D6, HIGH);

    delayMicroseconds(sleep);
    digitalWrite(D6, LOW);
    delay(30 * rtime);
    stop_rotate();
}

void setup()
{
    Infer.begin();
    Serial.begin(9600);
    pinMode(D6, OUTPUT);
}

void loop()
{
    if (!Infer.invoke())
    {
        if (Infer.boxes().size() > 0)
        {
            if (Infer.boxes()[0].x < 80)
            {
                servo_rotate(1, true);
            }
            else if (Infer.boxes()[0].x > 140)
            {
                servo_rotate(1, false);
            }
            Serial.print("X==>>");
            Serial.print(Infer.boxes()[0].x);
            Serial.print("Y==>>");
            Serial.println(Infer.boxes()[0].y);
        }
    }
}

Credits

meilily Li
14 projects • 49 followers
Love all things related to design and make.
Contact
Mengdu
5 projects • 12 followers
Contact
Seeed
102 projects • 174 followers
Seeed R&D Team
Contact
Thanks to Allen Kuang.

Comments

Please log in or sign up to comment.