Arduino Robot with Sharp IR Sensor

Hi,

My school has recently brought an Arduino Robot use in the RoboCup, along with half a dozen Sharp GP2Y0A02YK0F IR range sensors.

We have tried using the SharpIR Arduino library, but to no avail.

Does anyone have an idea of how to use these sensors? Can we even use them with the Arduino Robot?

Thanks,
Isaac

Ditch the lib you don't need it. The wiring is power to +5, ground to ground and the output to an analog pin. The you just use analogRead() to get the range when ever you want it. The graph in the datasheet is used to convert to cm if you want.

Mark

Uh, okay. Thanks for the reply!

Where exactly do I plug everything into on the board? I can't find any ground or power pins on it.

This is what we are using

Bump

According to the docs you have 4 analog inputs available on the control board it connects to one of these. Its up to you to figure out where they are.

Mark

From the link you gave,

Pins TKD0 to TKD3 can also be used as analog inputs with Robot.analogRead()

So you hook the sharp IR sensor to one of these pins and use RobotanalogRead() to read the sensor

I can't however find VCC/5V or GND in the documents but take a close look at the top of the control board they should be there!

Mark