Redone by me!
View Example
·
Report Bugs
Table of Contents
This is a modified version of popular circulating face tracking code that I found to not work on python2 or 3, and edited it to actually work for python3 lol!
- Arduino IDE
- Pyhton
- PySerial
- Numpy
- OpenCV
- 2x Servos
- Pan & Tilt Kit
- Arduino
- Breadboard & Wires
- USB Camera
- Install Python here (During installation you'll be asked if you want the IDLE editor, I'd reccomend getting it for ease of running the python script later!).
- Install PySerial, we can do this by openeing command prompt and typing
pip install serial
- Install Numpy
pip install numpy
- Install openCV
pip install opencv-python
- Install the Arduino IDE here!
- We're all done with software, now to the hardware! Lets move on to the next section to see how to wire the servos to the Arduino!

- Open Servo.ini using the Arduino IDE
- Under Tools-> Select the right Arduino board, and "COM Port", the USB port.
- Click the upload button
- Finished! Now we just have to run the Pyhton code.
- Open the IDLE editor, should've been installed while installing Python!
- Click Run -> Run Module ( Or click F5)
- You're done! You should now have a working face tracking camera and a pyhton window looking like this!
Graham - [email protected] Project Link: https://github.com/LanaDelSlay/Arduino-Face-Tracking/
- Cheap Arduino Board ($13)
- Small USB Camera ($45)
- Pan & Tilt Servo Case($20)
- Bread Board & Wires($10)
- Servo($8) (Currently the code is intended for one of these as the veritcal servo, and a continous turn servo for the horizontal.)
- Continous Servo For Horizontal Axis($17)









