Multiple IR sensor shield

I am keen to use this 4 IR sensor with arduino to control a motor that spins in the same direction of movement...say you wave or walk right to left the motor spins clockwise..and vice versa..
I saw this project somewhere years ago, please help me find the link. or suggest a code.
Many thanks

Just to add this shield uses LM339 comparator and circuit looks like this

The description of the project is a bit vague, I doubt that you'll find useful code.

You can try to watch for changes, in the left or right pair of sensors. When a sensor becomes active, turn the motor into that direction. If a sensor becomes inactive, turn into the opposite direction.

in this sketch I am trying to show that idea is when object moves in this arrow direction, the 4 sensors will get a signal difference according the direction . so from left to right for example will make sensor 1 take first reflection signal, then signal fading on Sensor 1 and getting stronger on sensor 2, and so on...

Your circuit diagram suggests a digital behaviour: a sensor is either ON or OFF, i.e. above or below a certain threshold value. The pots give the threshold value for every channel. Watch the LEDs to see the output when moving an object in front of the sensors.

Thanks Dr. ..I am only looking for the code, the hardware works very good.

DrDiettrich:
The description of the project is a bit vague, I doubt that you'll find useful code.

You can try to watch for changes, in the left or right pair of sensors. When a sensor becomes active, turn the motor into that direction. If a sensor becomes inactive, turn into the opposite direction.

The project is a plastic hand keeps pointing at the person as he/she passes by.
One arduino with servo, and a multiple sensor would do it. I saw similar on youtube, but no sharing the code. if anyone can please help.

As a basic exercise: how do you find out when a signal changes?

Hint: See the StateChangeDetection example.

Hi,
Is this thread associated with this thread?

http://forum.arduino.cc/index.php?topic=543395.0

Tom... :slight_smile: