Pages: [1]   Go Down
Author Topic: Sharp IR Sensor  (Read 637 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34493
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What Sharp IR sensor, there are lots if them?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34493
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: