Difference between revisions of "Component: Ultrasonic Ranger (Grove 101020010) (101020010) (Audio)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...") |
|||
(17 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
==Ultrasonic Ranger (Grove 101020010) component== | ==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. | 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. | ||
+ | |||
+ | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Ultrasonic_Ranger.fcfx FC_Comp_Source_Ultrasonic_Ranger.fcfx] | ||
+ | |||
+ | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Ultrasonic_Ranger.fcfx FC_Comp_Source_Ultrasonic_Ranger.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
Line 21: | Line 27: | ||
==Examples== | ==Examples== | ||
+ | This example performs an ultrasonic range sample using a hardware timer and then converts the sample from a timing into a measurement in millimetres, centimeters and inches. | ||
+ | {{Fcfile|Ultrasound_Test.fcfx|Ultrasound Test}} | ||
− | + | ==Macro reference== | |
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ===MeasureDistance=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 65: | Line 57: | ||
+ | ===Ping=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 78: | Line 71: | ||
+ | ===SampleSensor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 91: | Line 85: | ||
+ | ===WaitForEcho=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForEcho''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Waits until the echo has been received from the Ping macro allowing you to perform your own timing. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | + | ==Property reference== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:#D8C9D8; | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | |||
− | |||
|- | |- | ||
− | | | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
− | | width="90% | + | | width="90%" | Control Pin |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | colspan="2" | Pin connected to the emitter of the sensor. |
− | |||
|- | |- | ||
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Measurement | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="background-color:# | ||
− | | width="90%" style="background-color:# | ||
|- | |- | ||
|- | |- | ||
Line 170: | Line 124: | ||
|- | |- | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Timer Properties | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 176: | Line 134: | ||
| colspan="2" | Timer Peripheral to use to monitor the passage of time. | | colspan="2" | Timer Peripheral to use to monitor the passage of time. | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|- | |- |
Latest revision as of 10:04, 15 October 2024
Author | Matrix Ltd |
Version | 1.0 |
Category | Audio |
Contents
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.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Ultrasonic_Ranger.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Ultrasonic_Ranger.fcfx
Detailed description
No detailed description exists yet for this component
Examples
This example performs an ultrasonic range sample using a hardware timer and then converts the sample from a timing into a measurement in millimetres, centimeters and inches.
Macro reference
MeasureDistance
Ping
![]() |
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. | |
![]() |
Return |
SampleSensor
WaitForEcho
![]() |
WaitForEcho |
Waits until the echo has been received from the Ping macro allowing you to perform your own timing. | |
![]() |
Return |