Difference between revisions of "Component: Range Time of Flight (VL53L0X) (Light)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/RangeTOF_VL53L0X.fcfx FC_Comp_Source_temp/RangeTOF_VL53L0X.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_RangeTOF_VL53L0X.fcfx FC_Comp_Source_RangeTOF_VL53L0X.fcfx]
  
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/RangeTOF_VL53L0X.fcfx FC_Comp_Source_temp/RangeTOF_VL53L0X.fcfx]
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_RangeTOF_VL53L0X.fcfx FC_Comp_Source_RangeTOF_VL53L0X.fcfx]
  
 
==Detailed description==
 
==Detailed description==
Line 74: Line 74:
 
Simple example showing the proximity detector component at work, when a proximity is detected the direction of the motor is reversed.
 
Simple example showing the proximity detector component at work, when a proximity is detected the direction of the motor is reversed.
 
{{Fcfile|Detector.fcfx|Detector}}
 
{{Fcfile|Detector.fcfx|Detector}}
 +
 +
  
  

Revision as of 13:12, 7 February 2023

Author MatrixTSL
Version 1.0
Category Light


Range Time of Flight (VL53L0X) component

A laser based range sensor designed to provide accurate range infomation for a very narrow sensing beam. Capable of sensing ranges from 50mm to 1200mm. Communication with the device is based on a I2C bus.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_RangeTOF_VL53L0X.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_RangeTOF_VL53L0X.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Simple example showing the proximity detector component at work, when a proximity is detected the direction of the motor is reversed. FC6 Icon.png Detector






Macro reference

Initialise

Fc9-comp-macro.png Initialise
 
Fc9-bool-icon.png - BOOL Return


ReadDistance

Fc9-comp-macro.png ReadDistance
Read the current distance in mm. Returns -1 if the sensor timed out during the read operation. 
Fc9-s16-icon.png - INT Return


ReadModel

Fc9-comp-macro.png ReadModel
Collects the model number from the sensor 
Fc9-u8-icon.png - BYTE Return


ReadRevision

Fc9-comp-macro.png ReadRevision
Collects the revision number from the sensor 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png I2C Properties
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-7-icon.png Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms