Difference between revisions of "Component: Range Time of Flight (VL53L0X) (Light)"
From Flowcode Help
Jump to navigationJump to searchLine 14: | Line 14: | ||
==Range Time of Flight (VL53L0X) component== | ==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. | 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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Detailed description== | ==Detailed description== | ||
Line 74: | Line 68: | ||
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}} | ||
+ | |||
+ | |||
Line 88: | Line 84: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | ===ChangeI2CAddress=== | ||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ChangeI2CAddress''' | ||
+ | |- | ||
+ | | colspan="2" | Updates the I2C address of the sensor. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | Address | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
+ | | width="90%" | UpdateAddressReg | ||
+ | |- | ||
+ | | colspan="2" | 0=Leave address register alone, 1=Update address register | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
===Initialise=== | ===Initialise=== | ||
Line 238: | Line 258: | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | 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;" | Sensor Properties | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Range | ||
+ | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
Line 262: | Line 291: | ||
|- | |- | ||
| colspan="2" | Pin used for SDA (data signal) | | colspan="2" | Pin used for SDA (data signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | SDA Remap Pin | ||
+ | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
Line 267: | Line 301: | ||
|- | |- | ||
| colspan="2" | Pin used for SCL (clock signal) | | colspan="2" | Pin used for SCL (clock signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | SCL Remap Pin | ||
+ | |- | ||
+ | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
Line 282: | Line 321: | ||
| colspan="2" | | | colspan="2" | | ||
|} | |} | ||
+ | |||
+ | ==Component Source Code== | ||
+ | |||
+ | 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_RangeTOF_VL53L0X.fcfx FC_Comp_Source_RangeTOF_VL53L0X.fcfx] |
Revision as of 14:32, 13 May 2024
Author | MatrixTSL |
Version | 1.0 |
Category | Light |
Contents
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.
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.
Detector
Macro reference
ChangeI2CAddress
![]() |
ChangeI2CAddress |
Updates the I2C address of the sensor. | |
![]() |
Address |
![]() |
UpdateAddressReg |
0=Leave address register alone, 1=Update address register | |
![]() |
Return |
Initialise
![]() |
Initialise |
![]() |
Return |
ReadDistance
![]() |
ReadDistance |
Read the current distance in mm. Returns -1 if the sensor timed out during the read operation. | |
![]() |
Return |
ReadModel
![]() |
ReadModel |
Collects the model number from the sensor | |
![]() |
Return |
ReadRegister
![]() |
ReadRegister |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
ReadRegister16
![]() |
ReadRegister16 |
A simple example showing a generic way to read a register using I2C. | |
![]() |
Address |
![]() |
Return |
ReadRevision
![]() |
ReadRevision |
Collects the revision number from the sensor | |
![]() |
Return |
WriteRegister
![]() |
WriteRegister |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
WriteRegister16
![]() |
WriteRegister16 |
A simple example showing a generic way to write a register using I2C. | |
![]() |
Address |
![]() |
Data |
![]() |
Return |
Property reference
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