Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-macropad/badge/?version=latest
:target: https://docs.circuitpython.org/projects/macropad/en/latest/
:alt: Documentation Status
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/actions
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
A helper library for the Adafruit MacroPad RP2040.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Adafruit's CircuitPython NeoPixel library
<https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel>`_
* `Adafruit's CircuitPython HID library
<https://github.com/adafruit/Adafruit_CircuitPython_HID>`_
* `Adafruit's CircuitPython MIDI library
<https://github.com/adafruit/Adafruit_CircuitPython_MIDI>`_
* `Adafruit's CircuitPython Display Text library
<https://github.com/adafruit/Adafruit_CircuitPython_Display_Text>`_
* `Adafruit's CircuitPython Simple Text Display library
<https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display>`_
* `Adafruit's CircuitPython Debouncer library
<https://github.com/adafruit/Adafruit_CircuitPython_Debouncer>`_
* `Adafruit's CircuitPython Ticks library
<https://github.com/adafruit/Adafruit_CircuitPython_Ticks>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.
This library is designed to work withe the Adafruit MacroPad RP2040. Consider
purchasing one from the Adafruit shop:
`Adafruit MacroPad RP2040 Bare Bones <http://www.adafruit.com/products/5100>`_
`Adafruit MacroPad RP2040 Starter Kit <https://www.adafruit.com/product/5128>`_
Installing to a Connected CircuitPython Device with Circup
==========================================================
Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:
.. code-block:: shell
pip3 install circup
With ``circup`` installed and your CircuitPython device connected use the
following command to install:
.. code-block:: shell
circup install adafruit_macropad
Or the following command to update an existing version:
.. code-block:: shell
circup update
Usage Example
=============
This example prints out the key pressed, the relative position of the rotary encoder and the
state of the rotary encoder switch.
.. code-block:: python
from adafruit_macropad import MacroPad
import time
macropad = MacroPad()
while True:
key_event = macropad.keys.events.get()
if key_event and key_event.pressed:
print("Key pressed: {}".format(key_event.key_number))
print("Encoder: {}".format(macropad.encoder))
print("Encoder switch: {}".format(macropad.encoder_switch))
time.sleep(0.4)
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/macropad/en/latest/>`_.
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": null,
"name": "adafruit-circuitpython-macropad",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, macropad, rp2040, mechanical, keyboard, breakout, hardwaremicropython, circuitpython",
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/e2/8e/edd4b77f42a23a566e332c5de238d3054ab309776625ff60b37f90abd3d1/adafruit_circuitpython_macropad-2.4.1.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-macropad/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/macropad/en/latest/\n :alt: Documentation Status\n\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/actions\n :alt: Build Status\n\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\nA helper library for the Adafruit MacroPad RP2040.\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n\n* `Adafruit's CircuitPython NeoPixel library\n <https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel>`_\n\n* `Adafruit's CircuitPython HID library\n <https://github.com/adafruit/Adafruit_CircuitPython_HID>`_\n\n* `Adafruit's CircuitPython MIDI library\n <https://github.com/adafruit/Adafruit_CircuitPython_MIDI>`_\n\n* `Adafruit's CircuitPython Display Text library\n <https://github.com/adafruit/Adafruit_CircuitPython_Display_Text>`_\n\n* `Adafruit's CircuitPython Simple Text Display library\n <https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display>`_\n\n* `Adafruit's CircuitPython Debouncer library\n <https://github.com/adafruit/Adafruit_CircuitPython_Debouncer>`_\n\n* `Adafruit's CircuitPython Ticks library\n <https://github.com/adafruit/Adafruit_CircuitPython_Ticks>`_\n\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\n\nThis library is designed to work withe the Adafruit MacroPad RP2040. Consider\npurchasing one from the Adafruit shop:\n\n`Adafruit MacroPad RP2040 Bare Bones <http://www.adafruit.com/products/5100>`_\n`Adafruit MacroPad RP2040 Starter Kit <https://www.adafruit.com/product/5128>`_\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n circup install adafruit_macropad\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n circup update\n\nUsage Example\n=============\nThis example prints out the key pressed, the relative position of the rotary encoder and the\nstate of the rotary encoder switch.\n\n.. code-block:: python\n\n from adafruit_macropad import MacroPad\n import time\n\n macropad = MacroPad()\n\n while True:\n key_event = macropad.keys.events.get()\n if key_event and key_event.pressed:\n print(\"Key pressed: {}\".format(key_event.key_number))\n print(\"Encoder: {}\".format(macropad.encoder))\n print(\"Encoder switch: {}\".format(macropad.encoder_switch))\n time.sleep(0.4)\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/macropad/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A helper library for the Adafruit MacroPad RP2040",
"version": "2.4.1",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_MacroPad"
},
"split_keywords": [
"adafruit",
" macropad",
" rp2040",
" mechanical",
" keyboard",
" breakout",
" hardwaremicropython",
" circuitpython"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d7c88a52b7ba9ff6abdfed77e4891743203dbd0c9bb76aee96fe58fe7424804f",
"md5": "625de1cf3d378567aaa677dc86c7d65d",
"sha256": "ca9b921da70366e101c98fa23b7ab263127fb6e55a316ac1a43fa364bc3a35ec"
},
"downloads": -1,
"filename": "adafruit_circuitpython_macropad-2.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "625de1cf3d378567aaa677dc86c7d65d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12755,
"upload_time": "2024-10-07T22:31:36",
"upload_time_iso_8601": "2024-10-07T22:31:36.700970Z",
"url": "https://files.pythonhosted.org/packages/d7/c8/8a52b7ba9ff6abdfed77e4891743203dbd0c9bb76aee96fe58fe7424804f/adafruit_circuitpython_macropad-2.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e28eedd4b77f42a23a566e332c5de238d3054ab309776625ff60b37f90abd3d1",
"md5": "bbf56e0e490f1b4c470caf4cb426d839",
"sha256": "23999c7e8cc087db88c7c18b32f627cc8716648536be9de7eba3ecd2e29c6cb7"
},
"downloads": -1,
"filename": "adafruit_circuitpython_macropad-2.4.1.tar.gz",
"has_sig": false,
"md5_digest": "bbf56e0e490f1b4c470caf4cb426d839",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 122644,
"upload_time": "2024-10-07T22:31:37",
"upload_time_iso_8601": "2024-10-07T22:31:37.782603Z",
"url": "https://files.pythonhosted.org/packages/e2/8e/edd4b77f42a23a566e332c5de238d3054ab309776625ff60b37f90abd3d1/adafruit_circuitpython_macropad-2.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-07 22:31:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_MacroPad",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "adafruit-circuitpython-macropad"
}