DisplayPad
This library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color.
Example
import asyncio
from displaypad import DisplayPad
async def main():
# Create a new DisplayPad instance
pad = DisplayPad.DisplayPad()
# Define event handlers
@pad.on('down')
def on_key_down(key_index):
print(f"Key {key_index} has been pressed.")
# Define event handlers
@pad.on('up')
def on_key_down(key_index):
print(f"Key {key_index} has been released.")
# Define event handlers
@pad.on('error')
def on_error(error):
print(f"Error: {error}")
# Clear all keys
pad.clear_all_keys()
# Set the first three keys to red, green and blue
pad.set_key_color(0, 255, 0, 0)
pad.set_key_color(1, 0, 255, 0)
pad.set_key_color(2, 0, 0, 255)
# Keep the script running
while True:
await asyncio.sleep(1)
if __name__ == "__main__":
# Run the main function
asyncio.run(main())
Release files for DisplayPad 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| displaypad-1.0.3.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| DisplayPad-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / displaypad-1.0.3.tar.gz
| Download URL | displaypad-1.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
333211bb253bb33c32d9171ec859641c9b5ce883b6cdd07269680fa09993866f
|
|
BLAKE2b-256 checksum How to use checksums |
42ac043372e545d08c74e899750af64cdc050c5fa87f7a26879c1035371de070
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / DisplayPad-1.0.3-py3-none-any.whl
| Download URL | DisplayPad-1.0.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75f65326a3468b70b0d455e8a9d1a964f6e1d747c76a615971442bb009ddce33
|
|
BLAKE2b-256 checksum How to use checksums |
06d2ec33a09b9649b042c0f0186c6c752f672cbbeeced517442dca571d9d4547
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|