Go Down

Topic: Sharp IR Sensor (Read 780 times) previous topic - next topic

Aaron2010

Does anyone know how to go about turning the sharp IR sensor on and off so the beam isn't always on.

Grumpy_Mike

What Sharp IR sensor, there are lots if them?

Aaron2010

im using the sharp GP2Y0A21YK.  i need to turn it on for a second and off for 5 sec, then have the next sensor in the row come on after that first second and off for 5 sec and sequential repeat down the row.  my objective is to have a matrix of sensors detecting something in the middle of it while avoiding cross talk.  i cant have all the sensors on at once because the beams might interrupt each other or cross.

Grumpy_Mike

Simply connect the +5V line to one of the output pins. As the sensor only takes 30mA there will be enough current capacity. Then set the pin to be an output, write a HIGH to it to turn it on and a LOW to turn it off.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy