Difference between revisions of "Component: Light Sensor (Grove 101020132) (101020132) (Light)"
From Flowcode Help
Jump to navigationJump to search(3 intermediate revisions by the same user not shown) | |||
Line 51: | Line 51: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Macro reference== | ||
+ | |||
+ | ===GetAverageByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 89: | Line 85: | ||
+ | ===GetAverageInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 112: | Line 109: | ||
+ | ===GetByte=== | ||
{| 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;" | '''GetByte''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Blocking call to read the ADC as a byte |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetInt=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 138: | Line 137: | ||
+ | ===GetString=== | ||
{| 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;" | '''GetString''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Reads the ADC as a direct voltage and returns as as tring |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
+ | ===GetVoltage=== | ||
+ | {| 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;" | '''GetVoltage''' | ||
+ | |- | ||
+ | | colspan="2" | Reads the ADC as a direct voltage | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
Latest revision as of 13:11, 7 February 2023
Author | Matrix Ltd |
Version | 1.0 |
Category | Light |
Contents
Light Sensor (Grove 101020132) component
The Light sensor module is a simple analogue photo transistor. Used to detect the intensity of the indoor light.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Light_Sensor.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Light_Sensor.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetAverageByte
![]() |
GetAverageByte |
Function call to read the ADC as a byte average sample over time | |
![]() |
NumSamples |
![]() |
DelayUs |
Number of micro seconds in between taking each sample | |
![]() |
Return |
GetAverageInt
![]() |
GetAverageInt |
Function call to read the ADC as a full width average sample over time | |
![]() |
NumSamples |
![]() |
DelayUs |
Number of micro seconds in between taking each sample | |
![]() |
Return |
GetByte
![]() |
GetByte |
Blocking call to read the ADC as a byte | |
![]() |
Return |
GetInt
![]() |
GetInt |
Blocking call to read the ADC at full bit depth | |
![]() |
Return |
GetString
![]() |
GetString |
Reads the ADC as a direct voltage and returns as as tring | |
![]() |
Return |
GetVoltage
![]() |
GetVoltage |
Reads the ADC as a direct voltage | |
![]() |
Return |