|
||
| Description: | |||||||||||||
A Hardware Object that uses one I/O line to read a Sharp GP2D12 distance detector in a 64 steps per foot reading. |
|||||||||||||
| Operation: | |||||||||||||
The oIRRange Object reads an analog voltage from the I/O line specified by the IOLine property. It expects that the analog voltage is being provided by a Sharp GP2D12 Module connected to the I/O line. Once the analog voltage is read, its value is then used to look up a value in a measurement table that corresponds to the distance that the GP2D12 Module is away from its target. This distance value ( measured in 64 steps per foot) is then stored in the Value property. The oIRRange Object is an analog Object and shares the Analog-To-Digital converter module with all other analog Objects. See the oA2D Object for details on the Analog-To-Digital converter module. The oIRRange Object expects that the Analog-To-Digital converter module has its reference voltage set to 5 volts (which is the reference voltage at power up). Changing the OOPic.ExtVRef property will change the Voltage Reference and will cause the oIRRange to not function property. Each Sharp GP2D12 Module appears to return slightly different readings. The Center property was added in firmware version B.2.0 to allow the input value from the Sharp GP2D12 to be adjusted. When connecting a new Sharp GP2D12 Module, the Center property needs to be adjusted so that when nothing is in front of it, the oIRRange Object returns a steady reading of 128. The most common Center values are between 0 and 10. |
|||||||||||||
| Storage size & Availability: | |||||||||||||
The following table lists the size and availability of the oIRRange Object and its variations:
|
|||||||||||||
| Properties: | |||||||||||||
The following table lists the Properties of the oIRRange Object:
|
|||||||||||||
| Example: | |||||||||||||
In the following example, the oIRRange Object is used.
|
|||||||||||||
| See Also: | |||||||||||||
oIRPD1 - An Object that reads an IR Proximity Detector. |
|||||||||||||