Go Down

Topic: Controll servo by webcam (Read 4001 times) previous topic - next topic



I am just a starter with processing and the Arduino and I wonder if anyone can help me with my challenge.

For a design project at the University of Technology I, a third year student Industrial Design, am trying to control a servo motor with a web-cam.

To be more specific; I want use the web-cam to get the position of the person moving in front of it (in a value from 0-total left till 255-total right?). I want to use this value to rotate the servo motor which will control the direction of a lamp.

I really don't know where to start, so could you please help me?



Start off by connecting your web cam to processing, there are libraries that will do this. Then work out how to detect movement from the web cam. You might want to look at frame subtraction, that is subtracting successive frames, no movement shows up as zero (or close to it). Then calculate the position. Only then do you need to send that position down the serial port to the arduino which just takes numbers from the serial port and drives the servo to that position.

I hope I get a good mark.  ;)


Nov 29, 2010, 06:46 pm Last Edit: Nov 29, 2010, 06:47 pm by newman Reason: 1
well you came to the correct place
this shows you how to interface a servo to arduino
coming to the software part i think you need to post here
I hope I get a good mark.  



A site that might be of interest.

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


I am not sure of how to give a mark. But i thank you all for these first pointers. I just found out my web-cam broke down, so after buying a new one I'll try again. And i will surely post again with new question. Thnx a lot!!


Just a quick question....

Can i use the program provided on the arduino site to do all this? Or do i have to download the processing program on processing.org?


Dec 01, 2010, 05:27 pm Last Edit: Dec 01, 2010, 05:28 pm by newman Reason: 1
arduino is the smaller side of the project the main task is to process the image on whatsoever software then its just a matter of sending in a value to the servo over the serial connection


Or do i have to download the processing program on processing.org?

So your answer is yes.


So your answer is yes
:-[ :-[
perhaps i was going in too much  ;)


yes i can do it with the program provides by the arduino.cc website...or yes, i need to download the processing program on processing.org?

i'm sorry, i know i'm a noob :-[

Go Up