Jump to content

Component: Joystick (Sparkfun Quiic) 2D (Analog Input): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray..."
 
No edit summary
Line 20: Line 20:


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


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''


==Downloadable macro reference==
==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Line 107: Line 111:
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
|}
{| 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;" | '''ReadRegister'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| 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''
|}
|}
Line 136: Line 122:
| colspan="2" | Checks to see if the button is currently pressed&nbsp;
| colspan="2" | Checks to see if the button is currently pressed&nbsp;
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| 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;" | '''WriteRegister'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Address
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Value
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL

Revision as of 14:13, 20 January 2023

Author Matrix TSL
Version 1.0
Category Analog Input


Joystick (Sparkfun Quiic) 2D 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_2dgi.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

ChangeI2CAddress
Allows the I2C Device address to be changed which in turn allows more then one RFID reader to sit on the same physical I2C bus. Returns 1 if succesful. 
- BYTE NewAddress
Range: 8 to 119 or 0x08 - 0x77 
- BOOL Return


CheckButton
Checks to see if the button has been pressed since the last read of CheckButton or ReadButton. 
- BOOL Return


ReadAxis
Reads a single axis of the joystick and returns as a signed integer value. 
- BYTE Axis
Range 0-1 Where 0=X, 1=Y 
- BOOL Type
0 = Signed (-512 to 511), 1 = Unsigned (0 to 1023) 
- INT Return


SimMoveThumbStick
 
- FLOAT X
 
- FLOAT Y
 
- HANDLE Component
 
- VOID Return


ReadButton
Checks to see if the button is currently pressed 
- BOOL Return


Initialise
Initialises the I2C bus ready for communications with the module. 
- VOID Return



Property reference

Properties
Return To Center
Decides if the joystick automatically returns to the center position when released. Yes: The joystick will return to the center when released. No: The joystick will remain in the current position when released. 
Limits
X Min
 
X Max
 
Device Address
 
Theme
Box Colour
 
Shaft Colour
 
Knob Colour
 
Style
 
Style
Outline line style 
Connections
Channel
Channel selection 
Baud Select
Baud rate option selector 
SDA
Pin used for SDA (data signal) 
SDA Remap Pin
 
SCL
Pin used for SCL (clock signal) 
SCL Remap Pin
 
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.  
Simulation
Simulate Comms
 
Scope Traces
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window. 
Console Data
Selects if the console data is automatically generated or not 
API
Specifies the API component on the panel to interact with to provide comms simulation.