Lately I had some fun using the Arduino micro-controller with NodeJS.

One of my last project is a camera mounted on a Pan&Tilt that can track colors and even faces.


  • Arduino UNO
  • Mini breadboard
  • 2 servos
  • Pan & tilt frame
  • A webcam
  • A computer

This is the schematic

Mount the camera on the pan & tilt module and connect both Arduino and webcam to the PC.

Clone the repository from github

git clone

Install the dependencies

cd arduino-webcam-tracking && npm install

Run the application

node index.js

At this point if you visit the page http://localhost:3000 you should be able to see the webcam page and the application will start tracking your face (default tracking algorithm is face), if you want to change it to colors you need to use a different tracker. In the index.html file you can switch this line:

var tracker = new tracking.ObjectTracker('face');

with this one

var tracker = new tracking.ColorTracker(['magenta', 'cyan', 'yellow']);

Here is a video that show the device running

Some pictures


—Read This Next—

Jesse James Garret's methodology for designing digital products

Jesse James Garrett is an information architect based in San Francisco. Garrett authored "The Elements of User Experience", a conceptual mod
—You Might Enjoy—

Control flow with promises

Promises are very powerful and allow us to create really complex asynchronous data flows. When we want to execute tasks at the same time we