QwiicKeypad.
More...
|
| def | __init__ (self, address=None, i2c_driver=None) |
| |
| def | is_connected (self) |
| | Determine if a Keypad device is conntected to the system. More...
|
| |
| def | begin (self) |
| | Initialize the operation of the Keypad module. More...
|
| |
| def | get_button (self) |
| | Returns the button at the top of the stack (aka the oldest button). More...
|
| |
| def | time_since_pressed (self) |
| | Returns the number of milliseconds since the current button in FIFO was pressed. More...
|
| |
| def | get_version (self) |
| | Returns a string of the firmware version number. More...
|
| |
| def | update_fifo (self) |
| | "commands" keypad to plug in the next button into the registerMap note, this actually sets the bit0 on the updateFIFO register More...
|
| |
QwiicKeypad.
- Parameters
-
| address | The I2C address to use for the device. If not provided, the default address is used. |
| i2c_driver | An existing i2c driver object. If not provided a driver object is created. |
- Returns
- Object The QwiicKeypad device object.
◆ __init__()
| def qwiic_keypad.QwiicKeypad.__init__ |
( |
|
self, |
|
|
|
address = None, |
|
|
|
i2c_driver = None |
|
) |
| |
◆ begin()
| def qwiic_keypad.QwiicKeypad.begin |
( |
|
self | ) |
|
Initialize the operation of the Keypad module.
- Returns
- bool Returns true of the initializtion was successful, otherwise False.
◆ get_button()
| def qwiic_keypad.QwiicKeypad.get_button |
( |
|
self | ) |
|
Returns the button at the top of the stack (aka the oldest button).
The return value is the 'ascii' value of th key pressed. To convert
to a character, use the python char() function.
- Returns
- byte as integer The next button value
◆ get_version()
| def qwiic_keypad.QwiicKeypad.get_version |
( |
|
self | ) |
|
Returns a string of the firmware version number.
- Returns
- string The firmware version
◆ is_connected()
| def qwiic_keypad.QwiicKeypad.is_connected |
( |
|
self | ) |
|
Determine if a Keypad device is conntected to the system.
- Returns
- bool True if the device is connected, otherwise False.
◆ time_since_pressed()
| def qwiic_keypad.QwiicKeypad.time_since_pressed |
( |
|
self | ) |
|
Returns the number of milliseconds since the current button in FIFO was pressed.
- Returns
- integer The elapsed time since button was pressed
◆ update_fifo()
| def qwiic_keypad.QwiicKeypad.update_fifo |
( |
|
self | ) |
|
"commands" keypad to plug in the next button into the registerMap note, this actually sets the bit0 on the updateFIFO register
- Returns
- No return value
◆ address
| qwiic_keypad.QwiicKeypad.address |
◆ available_addresses
| qwiic_keypad.QwiicKeypad.available_addresses = _AVAILABLE_I2C_ADDRESS |
|
static |
◆ device_name
| qwiic_keypad.QwiicKeypad.device_name = _DEFAULT_NAME |
|
static |
◆ connected
◆ version
| qwiic_keypad.QwiicKeypad.version = property(get_version) |
|
static |
The documentation for this class was generated from the following file: