38 KHz IR proximity sensor connection with motorshield

Hello All:
I am trying to interface a 38KHz IR sensor on the circuit board of an ADAFruit Motor Shield. In the picture it has Digital I/O on top of the board and Analog I/O on the bottom. I see that the sensor has three leads: red=5v, Black=GND and yellow is going to be the output. I want to know if I should use simple jumper wires to connect it to a Digital I/O ? If anyone can point me to the Arduino library for this sensor that wold be great. I am very new to this. I really appreciate some help.

Thanks!


Hello.

I am not entirely sure, but it sounds like you are using our 38 kHz IR proximity sensor. That sensor has a digital output, so you could likely connect it (using a jumper wire sounds fine) to any digital IO on that board. Reading the sensor is just equivalent to reading a digital input (e.g. calling digitalRead()), so there isn’t much reason to have an Arduino library for it.

If that is not the sensor you are using, can you tell me the full name of or link to the one you are using?

-Jon

Yes, that is the in fact the sensor I am using. It is the 38 KHz IR sensor.

I guess I will have to read the digital inputs in an infinite loop as I am trying to put four sensors to check and stop the robot from bumping against a wall while moving.