Component: Keypad (4x4) (Keypad)

From Flowcode Help
Revision as of 09:04, 12 October 2020 by BenR (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Keypad


Image Keypad (4x4) component

Preset keypad based around the 4 * 4 unit.

Examples

No additional examples


Downloadable macro reference

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.

Parameters

This macro has no parameters


Return value

BYTE : Index of the first key pressed.


GetAscii

Gets the ASCII value for the current keypress. If no key is pressed then the macro returns the value 255.

Parameters

This macro has no parameters


Return value

BYTE : ASCII code of the pressed switch (or 255 if none pressed)


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.

Parameters

This macro has no parameters


Return value

STRING : Single character representing the pressed key, or an empty string if none pressed.


GetNumber

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

BYTE : Number return value of the pressed key, or 255 if none pressed.


GetIndex

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

BYTE : Index of the pressed switch, or 255 if none pressed.


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.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Column 1

This property is of type Single digital pin and can be referenced with the variable name keypad_base::pin_col1.

Pin for the first column of keys.

Columns are counted from left to right.

Column 2

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.

Columns are counted from left to right.

Column 3

This property is of type Single digital pin and can be referenced with the variable name keypad_base::pin_col3.

Pin for the third column of keys.

Columns are counted from left to right.

Column 4

This property is of type Single digital pin and can be referenced with the variable name keypad_base::pin_col4.

Pin for the fourth column of keys.

Columns are counted from left to right.

Row 1

This property is of type Single digital pin and can be referenced with the variable name keypad_base::pin_row1.

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.

Row 2

This property is of type Single digital pin and can be referenced with the variable name keypad_base::pin_row2.

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.

Row 3

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.

Row 4

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.