Difference between revisions of "Component: Joystick (Sparkfun Quiic) (Analog Input)"
From Flowcode Help
Jump to navigationJump to searchLine 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 40: | Line 42: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 62: | Line 66: | ||
[[Traffic_Light_2-Way|Traffic Light Scenario]] | [[Traffic_Light_2-Way|Traffic Light Scenario]] | ||
− | == | + | ==Macro reference== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 14:13, 20 January 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Analog Input |
Contents
Joystick (Sparkfun Quiic) component
An XY sprung joystick with click switch allowing for easy user input control. Connected using I2C bus.
Component Source Code
Please click here for the component source code: FC_Comp_Source_Sparkfun_Quiic_Joystick.fcfx
Detailed description
No detailed description exists yet for this component
Examples
There is a detailed walk through of the scenario detailed at the link below to go with this component.
Macro reference
![]() |
CheckButton |
Checks to see if the button has been pressed since the last read of CheckButton or ReadButton. | |
![]() |
Return |
![]() |
ReadAxis |
Reads a single axis of the joystick and returns as a signed integer value. | |
![]() |
Axis |
Range 0-1 Where 0=X, 1=Y | |
![]() |
Type |
0 = Signed (-512 to 511), 1 = Unsigned (0 to 1023) | |
![]() |
Return |
![]() |
ReadButton |
Checks to see if the button is currently pressed | |
![]() |
Return |
![]() |
Initialise |
Initialises the I2C bus ready for communications with the module. | |
![]() |
Return |