Jump to content

Component: Ultrasonic (HCSR04) (Audio): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
Line 14: Line 14:
==Ultrasonic component==
==Ultrasonic component==
This  board  has  both  an  ultrasonic  transmitter  and receiver.  When the Trig pin is set high for 10uS, the transmitter sends eight 40KHz pulses.  The Echo pin goes high about 2ms later.  The duration of the Echo pin is measure when it goes high, and a distance is then calculated based on the high duration. The distance of objects in a range of around 3cm to 2.75m can be determined.  
This  board  has  both  an  ultrasonic  transmitter  and receiver.  When the Trig pin is set high for 10uS, the transmitter sends eight 40KHz pulses.  The Echo pin goes high about 2ms later.  The duration of the Echo pin is measure when it goes high, and a distance is then calculated based on the high duration. The distance of objects in a range of around 3cm to 2.75m can be determined.  
==Component Pack==
SENSORS


==Detailed description==
==Detailed description==




Line 26: Line 32:


==Examples==
==Examples==





Revision as of 16:23, 7 January 2022

Author Matrix TSL
Version 1.0
Category Audio


Ultrasonic component

This board has both an ultrasonic transmitter and receiver. When the Trig pin is set high for 10uS, the transmitter sends eight 40KHz pulses. The Echo pin goes high about 2ms later. The duration of the Echo pin is measure when it goes high, and a distance is then calculated based on the high duration. The distance of objects in a range of around 3cm to 2.75m can be determined.

Component Pack

SENSORS

Detailed description

No detailed description exists yet for this component

Examples

HC-SR04 Distance Sensor Demo.fcfx

Downloadable macro reference

GetDistance
Sends a pulse and processes the echo. Returns a object distance in cm 
- UINT Return



Property reference

Properties
OutputTrig Pin
Pin used for controlling the output pulse 
Input Echo Pin
ADC channel used to monitor the echo 
Connections
Simulations