Subject:
|
RE: Sharp GP2D05?
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 8 Mar 1999 14:05:03 GMT
|
Original-From:
|
Barry Brouillette <barry@+Spamcake+sgi.com>
|
Viewed:
|
1000 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
I have used the Sharp GP2D05 with the Handy Board and found it to be
extremely simple to use. It is easy to control in either IC or in assembly
language and easy to adjust for range. There is a tiny potentiometer on the
back of the unit that you adjust to tell the device what your 'bump range'
is. It has the same distance limitations as the GP2D02 (minimum 10cm
maximum 80cm).
Barry
-----Original Message-----
From: edmund [mailto:ho106@singnet.com.sg]
Sent: Monday, March 08, 1999 10:10 PM
To: HandyBoard
Subject: Sharp GP2D05?
hello
anyone tried interfacing the Sharp GP2D05 sensors to the handyboard
before? i'm thinking of buying some as i need a reliable and cheap
digital(Yes/No) sensor. from what i can understand, there are 4
wires, Vin, Vcc, Gnd and Vout. the Vcc, Gnd and Vout can be
connected directly to the handyboard digital input while digital
input #9 can be configured as an output to provide a signal for Vin.
the operating procedure for the GP2D05 also sounds simple enough:
1. Pull the normally high(3V) Vin low(0V).
2. Wait 56ms.
3. Read Vout - if LOW(0V) --> no obstacle and vice versa.
4. Pull Vin to high again to Reset.
the question is, will the following code do the job? is it too
simple? from what i've seen, it seems that the GP2D02 requires
some complicated code to make it work with the handyboard.
bit_set(0x1000, 0x80); /* set digital output #9(Vin) low */
msleep(56L); /* delay for 56ms */
a=digital(5); /* read digital input #5 and store
the reading in int variable a. */
bit_clear(0x1000, 0x80); /* set digital #9 high to reset */
any comments, advice or criticism will be greatly appreciated. i'm
a robotics newbie and i'm afraid that i would spend a lot of money
buying a sensor that doesn't work. please help. thanks a million!
~edmund
|
|
1 Message in This Thread: ![You are here](/news/here.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|