Qwiic_Keypad_Py
Python for SFE Qwiic Keypad
Loading...
Searching...
No Matches
qwiic_keypad.QwiicKeypad Class Reference

QwiicKeypad. More...

Inheritance diagram for qwiic_keypad.QwiicKeypad:

Public Member Functions

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...
 

Public Attributes

 address
 

Static Public Attributes

 device_name = _DEFAULT_NAME
 
 available_addresses = _AVAILABLE_I2C_ADDRESS
 

Properties

 connected = property(is_connected)
 
 version = property(get_version)
 

Detailed Description

QwiicKeypad.

Parameters
addressThe I2C address to use for the device. If not provided, the default address is used.
i2c_driverAn existing i2c driver object. If not provided a driver object is created.
Returns
Object The QwiicKeypad device object.

Constructor & Destructor Documentation

◆ __init__()

def qwiic_keypad.QwiicKeypad.__init__ (   self,
  address = None,
  i2c_driver = None 
)

Member Function Documentation

◆ 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

Member Data Documentation

◆ 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

Property Documentation

◆ connected

qwiic_keypad.QwiicKeypad.connected = property(is_connected)
static

◆ version

qwiic_keypad.QwiicKeypad.version = property(get_version)
static

The documentation for this class was generated from the following file: