Skip to content

boreddevnl/facetrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

facetrack

A Simple Arduino project that uses the camera (python script) to turn coordinates into degrees for servos attached to an arduino and turn on a water pump to spray water. (Turret)

Hardware Requirements

  • Arduino board
  • 4 servo motors (horizontal, vertical and 2 servo's to turn the pump on/off)
  • LED
  • Webcam
  • USB cable for Arduino connection
  • Water pump
  • Breadboard if you don't have an Arduino sensor board

Pin Configuration

  • horservo: Pin 8
  • verservo: Pin 7
  • LED: Pin 6
  • servo_on: Pin 5
  • servo_off: Pin 4

Software Requirements

  • Python 3.x
  • OpenCV (cv2)
  • pyserial
  • Arduino IDE

Installation

  1. Install the required Python packages:
pip install opencv-python pyserial
  1. Upload the Arduino sketch (facetrack.ino) to your Arduino board using the Arduino IDE.

  2. Connect the hardware according to the pin configuration.

  3. Update the ARDUINO_PORT in facerec.py to match your Arduino's port.

Usage

  1. Connect the Arduino to your computer.

  2. Run the Python script:

python facerec.py
  1. The system will:

    • Initialize the camera and Arduino connection
    • Display the camera feed
    • Control the servos to track detected faces
    • Turn on the water pump to spray water when a face is detected.
  2. ctrl + c to quit

Camera Settings

  • Resolution: 640x480

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published