QwiicJoystick.
More...
|
| def | __init__ (self, address=None, i2c_driver=None) |
| |
| def | is_connected (self) |
| | Determine if a Joystick device is conntected to the system. More...
|
| |
| def | begin (self) |
| | Initialize the operation of the Joystick module. More...
|
| |
| def | get_horizontal (self) |
| | Returns the 10-bit ADC value of the joystick horizontal position. More...
|
| |
| def | get_vertical (self) |
| | Returns the 10-bit ADC value of the joystick vertical position. More...
|
| |
| def | get_button (self) |
| | Returns 0 button is currently being pressed. More...
|
| |
| def | check_button (self) |
| | Returns 1 if button was pressed between reads of .getButton() or .checkButton() the register is then cleared after read. More...
|
| |
| def | get_version (self) |
| | Returns a string of the firmware version number. More...
|
| |
QwiicJoystick.
- 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
- The
◆ __init__()
| def qwiic_joystick.QwiicJoystick.__init__ |
( |
|
self, |
|
|
|
address = None, |
|
|
|
i2c_driver = None |
|
) |
| |
◆ begin()
| def qwiic_joystick.QwiicJoystick.begin |
( |
|
self | ) |
|
Initialize the operation of the Joystick module.
- Returns
- bool Returns true of the initializtion was successful, otherwise False.
◆ check_button()
| def qwiic_joystick.QwiicJoystick.check_button |
( |
|
self | ) |
|
Returns 1 if button was pressed between reads of .getButton() or .checkButton() the register is then cleared after read.
- Returns
- integer button status
◆ get_button()
| def qwiic_joystick.QwiicJoystick.get_button |
( |
|
self | ) |
|
Returns 0 button is currently being pressed.
- Returns
- integer button status
◆ get_horizontal()
| def qwiic_joystick.QwiicJoystick.get_horizontal |
( |
|
self | ) |
|
Returns the 10-bit ADC value of the joystick horizontal position.
- Returns
- byte as integer The next button value
◆ get_version()
| def qwiic_joystick.QwiicJoystick.get_version |
( |
|
self | ) |
|
Returns a string of the firmware version number.
- Returns
- string The firmware version
◆ get_vertical()
| def qwiic_joystick.QwiicJoystick.get_vertical |
( |
|
self | ) |
|
Returns the 10-bit ADC value of the joystick vertical position.
- Returns
- byte as integer The next button value
◆ is_connected()
| def qwiic_joystick.QwiicJoystick.is_connected |
( |
|
self | ) |
|
Determine if a Joystick device is conntected to the system.
- Returns
- bool True if the device is connected, otherwise False.
◆ address
| qwiic_joystick.QwiicJoystick.address |
◆ available_addresses
| qwiic_joystick.QwiicJoystick.available_addresses = _AVAILABLE_I2C_ADDRESS |
|
static |
◆ device_name
| qwiic_joystick.QwiicJoystick.device_name = _DEFAULT_NAME |
|
static |
◆ button
| qwiic_joystick.QwiicJoystick.button = property(get_button) |
|
static |
◆ connected
| qwiic_joystick.QwiicJoystick.connected = property(is_connected) |
|
static |
◆ horizontal
◆ version
| qwiic_joystick.QwiicJoystick.version = property(get_version) |
|
static |
◆ vertical
| qwiic_joystick.QwiicJoystick.vertical = property(get_vertical) |
|
static |
The documentation for this class was generated from the following file: