| ||
| Description: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
A Hardware Object that controls a Polaroid Ultrasonic Range Finder and measures the distance between the sonar transducer and its target in 64 steps per foot increments. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operation: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The oSonarDV Object handles all the necessary I/O timing required to communicate with the Polaroid Ultrasonic Range Finder and measure the distance between the sonar transducer and its target. All that is required to retrieve this distance, is changing the Operate property from a value of 0 to a value of 1. When the oSonarPL's Operate property transitions from 0 to 1, a ping signal is sent out the I/O line specified by the IOLineP property, the Transmitting property is set to 1 and the Received property is cleared to 0. After which, the oSonarDV monitors the IOLineE property waiting for an echo. Once the echo is received, the time-of-flight is stored in the Value property, the Transmitting property is cleared to 0 and the Received property is set to 1. If no echo was received after a short period of time, the Transmitting property is cleared to 0 and the TimeOut property is set to 1. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Storage size & Availability: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the size and availability of the oSonarPL Object and its variations:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Properties: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table lists the Properties of the oSonarPL Object:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
In the following example, the oSonarPL Object is used.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Connections: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The oSonarPL uses 2 I/O lines and 2 power lines. The I/O lines can be any
2 of the OOPic's 31 I/O lines. The Polaroid Sonar requires a 5 to
6 Volt power supply that is capable of handling roughly 2000mA (2 amps)
during the transmit period and 100ma after the transmit period.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| See Also: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
oSonarDV - An Object that reads a Devantech SRF04 Ultrasonic Range Finder. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||