Difference between revisions of "Component: Keypad (BL0138) (BL0138) (E-blocks 2)"

From Flowcode Help
Jump to navigationJump to search
 
(7 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx]
 +
 
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx FC_Comp_Source_EBlocks2_KeyPad_BL0138.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 28: Line 38:
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 34: Line 52:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
==Macro reference==
 
==Macro reference==
  
 +
===GetAscii===
 
{| 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;" | '''WaitPressed'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAscii'''
 
|-
 
|-
| colspan="2" | Blocking call that waits for one of the keys on the keypad to be pressed. The index of the key that was pressed is passed back to the user.&nbsp;
+
| colspan="2" | Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255.&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 50: Line 79:
  
  
 +
===GetIndex===
 
{| 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;" | '''GetAscii'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIndex'''
 
|-
 
|-
| colspan="2" | Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255.&nbsp;
+
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255.&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 63: Line 93:
  
  
 +
===GetNumber===
 
{| 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;" | '''GetString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetNumber'''
 
|-
 
|-
| colspan="2" | Gets the ASCII value for the current keypress and returns in the form of a string. If no key pressed then the macro returns a null string.&nbsp;
+
| colspan="2" | Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| 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''
 
|}
 
|}
  
  
 +
===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;" | '''GetNumber'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetString'''
 
|-
 
|-
| colspan="2" | Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255.&nbsp;
+
| colspan="2" | Gets the ASCII value for the current keypress and returns in the form of a string. If no key pressed then the macro returns a null string.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
+
| 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''
 
|}
 
|}
  
  
 +
===WaitPressed===
 
{| 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;" | '''GetIndex'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitPressed'''
 
|-
 
|-
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255.&nbsp;
+
| colspan="2" | Blocking call that waits for one of the keys on the keypad to be pressed. The index of the key that was pressed is passed back to the user.&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 102: Line 135:
  
  
 +
===WaitReleased===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 113: Line 147:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 13:10, 7 February 2023

Author Matrix TSL
Version 1.0
Category E-blocks 2


Keypad (BL0138) component

Keypad component to drive the E-blocks 2 BL0138 Keypad board. Provides twelve individual raster scanned switches.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

GetAscii

Fc9-comp-macro.png GetAscii
Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255. 
Fc9-u8-icon.png - BYTE Return


GetIndex

Fc9-comp-macro.png GetIndex
Gets the index value for the current keypress. If no key pressed then the macro returns the value 255. 
Fc9-u8-icon.png - BYTE Return


GetNumber

Fc9-comp-macro.png GetNumber
Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255. 
Fc9-u8-icon.png - BYTE Return


GetString

Fc9-comp-macro.png GetString
Gets the ASCII value for the current keypress and returns in the form of a string. If no key pressed then the macro returns a null string. 
Fc9-string-icon.png - STRING Return


WaitPressed

Fc9-comp-macro.png WaitPressed
Blocking call that waits for one of the keys on the keypad to be pressed. The index of the key that was pressed is passed back to the user. 
Fc9-u8-icon.png - BYTE Return


WaitReleased

Fc9-comp-macro.png WaitReleased
Blocking call that waits for the keys on the keypad to be released. If no key is pressed then the function will return immediatley. 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Port
From here, set the port to which your EB014 is connected. If you are wiring your own hardware, you can use the 'Custom Pins' setting to allow the selection of individual pins for each row or column.