Difference between revisions of "Component: Keypad (4x4) (Keypad)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Keypad
 
| Keypad
 
|}
 
|}
  
  
 
+
==Keypad component==
==[[File:Component Icon 6c74b9ee_2907_4b1e_8a9b_80fc192b6027.png|Image]] Keypad (4x4) component==
 
 
Preset keypad based around the 4 * 4 unit.
 
Preset keypad based around the 4 * 4 unit.
  
==Examples==
+
==Component Pack==
''<span style="color:red;">No additional examples</span>''
 
  
 +
BASICIO
  
==Downloadable macro reference==
+
==Detailed description==
  
===<span style="font-weight: normal;"><u><tt>WaitPressed</tt></u></span>===
+
''No detailed description exists yet for this component''
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.
 
  
'''Parameters'''
+
==Examples==
  
:''This macro has no parameters''
 
  
 +
''<span style="color:red;">No additional examples</span>''
  
'''Return value'''
 
  
:[[Variable Types|BYTE]] : Index of the first key pressed.
+
==Downloadable 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.&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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetAscii</tt></u></span>===
 
Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255.
 
  
'''Parameters'''
+
{| 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.&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''
 +
|}
  
:''This macro has no parameters''
 
  
 +
{| 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 the value 255.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|BYTE]] : ASCII code of the pressed switch (or 255 if none pressed)
+
{| 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.&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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetString</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Gets the ASCII value for the current keypress and returns in the form of a string. If no key pressed then the macro returns the value 255.
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
'''Parameters'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIndex'''
 
+
|-
:''This macro has no parameters''
+
| colspan="2" | Gets the index value for the current keypress. If no key pressed then the macro returns the value 255.&nbsp;
 
+
|-
 
+
|-
'''Return value'''
+
| 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''
:[[Variable Types|STRING]] : Single character representing the pressed key, or an empty string if none pressed.
+
|}
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetNumber</tt></u></span>===
 
Gets the numeric value for the current keypress. If no key pressed then the macro returns the value 255.
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]] : Number return value of the pressed key, or 255 if none pressed.
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetIndex</tt></u></span>===
 
Gets the index value for the current keypress. If no key pressed then the macro returns the value 255.
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BYTE]] : Index of the pressed switch, or 255 if none pressed.
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>WaitReleased</tt></u></span>===
 
Blocking call that waits for the keys on the keypad to be released. If no key is pressed then the function will return immediatley.
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
 +
{| 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.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Column 1</u></span>
 
  
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_col1''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Pin for the first column of keys.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
Columns are counted from left to right.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Column 2</u></span>
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_col2''.
+
|-
 
+
|-
Pin for the second column of keys.
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Column 1
Columns are counted from left to right.
+
|-
 
+
| colspan="2" | Pin for the first column of keys. Columns are counted from left to right.&nbsp;
<span style="font-weight: normal;"><u>Column 3</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_col3''.
+
| width="90%" | Column 2
 
+
|-
Pin for the third column of keys.
+
| colspan="2" | Pin for the second column of keys. Columns are counted from left to right.&nbsp;
 
+
|-
Columns are counted from left to right.
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Column 3
<span style="font-weight: normal;"><u>Column 4</u></span>
+
|-
 
+
| colspan="2" | Pin for the third column of keys. Columns are counted from left to right.&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_col4''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Pin for the fourth column of keys.
+
| width="90%" | Column 4
 
+
|-
Columns are counted from left to right.
+
| colspan="2" | Pin for the fourth column of keys. Columns are counted from left to right.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Row 1</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Row 1
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_row1''.
+
|-
 
+
| colspan="2" | Pin for the first row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section.&nbsp;
Pin for the first row of keys.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Columns are counted from top to bottom by default - they can be counted from bottom to top
+
| width="90%" | Row 2
 
+
|-
by changing the 'First Row' property in the 'Dimensions' section.
+
| colspan="2" | Pin for the second row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Row 2</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Row 3
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_row2''.
+
|-
 
+
| colspan="2" | Pin for the third row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section.&nbsp;
Pin for the second row of keys.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
Columns are counted from top to bottom by default - they can be counted from bottom to top
+
| width="90%" | Row 4
 
+
|-
by changing the 'First Row' property in the 'Dimensions' section.
+
| colspan="2" | Pin for the fourth row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Row 3</u></span>
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_row3''.
+
|-
 
+
|}
Pin for the third row of keys.
 
 
 
Columns are counted from top to bottom by default - they can be counted from bottom to top
 
 
 
by changing the 'First Row' property in the 'Dimensions' section.
 
 
 
<span style="font-weight: normal;"><u>Row 4</u></span>
 
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''keypad_base::pin_row4''.
 
 
 
Pin for the fourth row of keys.
 
 
 
Columns are counted from top to bottom by default - they can be counted from bottom to top
 
 
 
by changing the 'First Row' property in the 'Dimensions' section.
 

Revision as of 16:20, 7 January 2022

Author Matrix TSL
Version 1.0
Category Keypad


Keypad component

Preset keypad based around the 4 * 4 unit.

Component Pack

BASICIO

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

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


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


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 the value 255. 
Fc9-string-icon.png - STRING Return


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


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


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-5-icon.png Column 1
Pin for the first column of keys. Columns are counted from left to right. 
Fc9-type-5-icon.png Column 2
Pin for the second column of keys. Columns are counted from left to right. 
Fc9-type-5-icon.png Column 3
Pin for the third column of keys. Columns are counted from left to right. 
Fc9-type-5-icon.png Column 4
Pin for the fourth column of keys. Columns are counted from left to right. 
Fc9-type-5-icon.png Row 1
Pin for the first row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section. 
Fc9-type-5-icon.png Row 2
Pin for the second row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section. 
Fc9-type-5-icon.png Row 3
Pin for the third row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section. 
Fc9-type-5-icon.png Row 4
Pin for the fourth row of keys. Columns are counted from top to bottom by default - they can be counted from bottom to top by changing the 'First Row' property in the 'Dimensions' section. 
Fc9-conn-icon.png Simulations