Difference between revisions of "Component: Keypad (Numeric 3x4) (Keypad)"

From Flowcode Help
Jump to navigationJump to search
 
(5 intermediate revisions by one other user not shown)
Line 22: Line 22:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 38: Line 40:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 63: Line 67:
 
LED is used to show the pin status controlling the door lock.
 
LED is used to show the pin status controlling the door lock.
  
{{Fcfile|Keypad Door Entry.fcfx.fcfx|Keypad Door Entry}}
+
{{Fcfile|Keypad Door Entry.fcfx|Keypad Door Entry}}
  
 
==Macro reference==
 
==Macro reference==
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===GetAscii===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitPressed'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 93: Line 85:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===GetIndex===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetString'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetNumber'''
 
|-
 
| colspan="2" | Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 132: Line 99:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===GetNumber===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitReleased'''
 
|-
 
| colspan="2" | Blocking call that waits for the keys on the keypad to be released. If no key is pressed then the function will return immediatley. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| 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;" | Connections
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Port
 
|-
 
| colspan="2" | 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. 
 
|}==Macro reference==
 
 
 
{| 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;" | '''WaitPressed'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetAscii'''
 
|-
 
| colspan="2" | Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetString'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 217: Line 113:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===GetString===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIndex'''
 
|-
 
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''WaitReleased'''
 
|-
 
| colspan="2" | Blocking call that waits for the keys on the keypad to be released. If no key is pressed then the function will return immediatley. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| 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;" | Connections
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Port
 
|-
 
| colspan="2" | 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. 
 
|}==Macro reference==
 
 
 
{| 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;" | '''WaitPressed'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetAscii'''
 
|-
 
| colspan="2" | Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 302: Line 127:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===WaitPressed===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetNumber'''
 
|-
 
| colspan="2" | Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetIndex'''
 
|-
 
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''WaitReleased'''
 
|-
 
| colspan="2" | Blocking call that waits for the keys on the keypad to be released. If no key is pressed then the function will return immediatley. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| 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;" | Connections
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Port
 
|-
 
| colspan="2" | 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. 
 
|}==Macro reference==
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 374: Line 141:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===WaitReleased===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetAscii'''
 
|-
 
| colspan="2" | Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetString'''
 
|-
 
| 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. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetNumber'''
 
|-
 
| colspan="2" | Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''GetIndex'''
 
|-
 
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255. 
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 437: Line 153:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 15:15, 22 January 2024

Author Matrix Ltd
Version 1.0
Category Keypad


Keypad (Numeric 3x4) component

Preset keypad based around the 3 * 4 unit, as used by the Matrix EB014 E-block

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Basic Example

Keypad Example File demonstrating controlling a door lock.

LED is used to show the pin status controlling the door lock.

FC6 Icon.png Keypad Door Entry

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.