| Author
|
Matrix Ltd
|
| Version
|
1.0
|
| Category
|
Audio
|
Ultrasonic Ranger (Grove 101020010) component
The ultrasonic sensor is a non-contact distance measurement module. It's designed for easy modular project usage with industrial performance. Detecting range: 3cm to 4m, best in 30 degree angle.
Detailed description
No detailed description exists yet for this component
Examples
This example performs an ultrasonic range sample and then converts the sample from a timing into a measurement in millimetres.
UltraSound Test
Downloadable macro reference
|
WaitForEcho
|
| Waits until the echo has been received from the Ping macro allowing you to perform your own timing.
|
- VOID
|
Return
|
|
MeasureDistance
|
| Converts a micro second time from the ultrasonic range sensor and returns the range in mm, cm or inches.
|
- UINT
|
TimeDelay
|
| Microsecond reading from Ultrasound module
|
- BYTE
|
Scale
|
| 0=MM / 1=CM / 2=Inch
|
- UINT
|
Return
|
|
Ping
|
| Performs a transmit ping allowing you to monitor the incoming signal and perform your own timings maybe using a rising edge interrupt and a timer.
|
- VOID
|
Return
|
|
SampleSensor
|
| Sends out an ultrasonic ping and times how long it takes to receive the echo. Returns the time in microseconds. Performs the timing using software so depending on the speed of the micro will be an approximation. For better results use the Ping macro.
|
- UINT
|
Return
|
Property reference
|
Properties
|
|
Time Measurement
|
| Controls how the sensors ultrasonic ping is timed, Either using single microsecond delays or using timer hardware. On slower devices e.g. PIC it is advisable to use the Timer method.
|
|
Timer
|
| Timer Peripheral to use to monitor the passage of time.
|
|
Connections
|
|
Control Pin
|
| Pin connected to the emitter of the sensor.
|
|
Simulations
|
|
Discrete Distance
|
| Simulation range used to determine if the sense pin is active or not.
|