GP2D02 Sharp IR Sensor
Archiver
Posts: 46,084
Hi there!
Well, i haven't had the chance to work on the transceivers for our
project yet, because we're trying to get this IR sensor to work. Can
anyone out there help us? Its not working! We've downloaded code,
and connected the sensor to the diagram at acroname.com's site, and
it doesn't want to work.
Thanks
Debu
Well, i haven't had the chance to work on the transceivers for our
project yet, because we're trying to get this IR sensor to work. Can
anyone out there help us? Its not working! We've downloaded code,
and connected the sensor to the diagram at acroname.com's site, and
it doesn't want to work.
Thanks
Debu
Comments
First
What happens if you just have 5v, gnd, a clock ( a switch)?
Second: Take a look at the following pages for ideas..
http://www.acroname.com/robotics/parts/R19-IR02.html
http://www.hobbyrobot.com/info/gp2d02/index.html
Third: Provide more detail. What does it not do? What does it do?
Phil
--- In basicstamps@y..., debu_sen_22@y... wrote:
> Hi there!
>
> Well, i haven't had the chance to work on the transceivers for our
> project yet, because we're trying to get this IR sensor to work.
Can
> anyone out there help us? Its not working! We've downloaded code,
> and connected the sensor to the diagram at acroname.com's site, and
> it doesn't want to work.
>
> Thanks
>
> Debu
Ok, our problem is that when we try the code from Acroname, we don't
really get something that makes sense. We do get a bunch of random
numbers, but, they don't make logical sense.
We were also wondering what exactly does pin 2 and pin 4 of the IR
sensor do? Does the output pin just give a 1 or 0 indicating it has
sensed something, or does it return an actual distance?
This is another code that we are trying to get to work:
'{$STAMP BS2sx}
Main:
high 0 'pin 0 is clock, connected to pin2 on sensor, high turns
sensor off
pause 3
low 0
pause 56
r1:
if in1=0 then r1 'pin 1 connected to pin4 on sensor
debug "Object Detected",cr
pause 1000
goto Main
but, the thing is, all we get is 'object detected' to constantly
print...even if there is NO object in front of the sensor...we are
thinking that the pin is tied to low, and we are unsure of why?
Thank you
Debu
>
> Ok, our problem is that when we try the code from Acroname, we don't
> really get something that makes sense. We do get a bunch of random
> numbers, but, they don't make logical sense.
>
> We were also wondering what exactly does pin 2 and pin 4 of the IR
> sensor do? Does the output pin just give a 1 or 0 indicating it has
> sensed something, or does it return an actual distance?
You might like to download the documentation from our DIRRS kit (uses the
GP2D02 sensor). Our manual answers all your questions and we haven't had
any problem with the Stamp code that comes with it. You should note that
our kit uses 2 resistors instead of the diode.
You can find it in our downloads section, under sensors:
http://www.hvwtech.com/downloads.htm
Mark Hillier
President, HVW Technologies Inc.
Mark@H...
Tel[noparse]:([/noparse]403)730-8603 Fax[noparse]:([/noparse]403)730-8903
http://www.HVWTech.com
See our NEW BASIC Stamp Prototyping tools !