Difference between revisions of "Component: Keypad (EB014) (E-blocks 1)"
(XML import - Pre 8.0 release) |
|||
Line 19: | Line 19: | ||
==Examples== | ==Examples== | ||
− | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===Basic Example=== | ||
+ | |||
+ | Keypad Example File demonstrating controlling a door lock. | ||
+ | |||
+ | LED is used to show the pin status controlling the door lock. | ||
+ | |||
+ | {{Fcfile|Keypad Door Entry.fcfx.fcfx|Keypad Door Entry}} | ||
==Downloadable macro reference== | ==Downloadable macro reference== |
Latest revision as of 12:35, 7 February 2022
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | E-blocks 1 |
Contents
Keypad (EB014) component
Preset keypad based around the 3 * 4 unit, as used by the Matrix EB014 E-block
Examples
Basic Example
Keypad Example File demonstrating controlling a door lock.
LED is used to show the pin status controlling the door lock.
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
Port
This property is of type Fixed list of ints and can be referenced with the variable name 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.