adafruit-circuitpython-wii-classic


Nameadafruit-circuitpython-wii-classic JSON
Version 1.0.5 PyPI version JSON
download
home_page
SummaryCircuitPython library for Nintendo Wii Classic controllers.
upload_time2023-12-09 17:36:57
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython wii_classic wii classic remote control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============


.. image:: https://readthedocs.org/projects/adafruit-circuitpython-wii-classic/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/wii_classic/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_Wii_Classic/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_Wii_Classic/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

CircuitPython library for Nintendo Wii Classic controllers.


Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_

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

Works with the Wii Nunchuck Breakout Adapter and a Wii Classic Controller.

`Purchase one from the Adafruit shop <http://www.adafruit.com/products/4836>`_.

Installing from PyPI
=====================

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/Adafruit-circuitpython-wii-classic/>`_.
To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-wii-classic

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-wii-classic

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .env/bin/activate
    pip3 install Adafruit-circuitpython-wii-classic

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_wii_classic

Or the following command to update an existing version:

.. code-block:: shell

    circup update

Usage Example
=============

.. code-block:: python

	import time
	import board
	import adafruit_wii_classic

	i2c = board.STEMMA_I2C()
	ctrl_pad = adafruit_wii_classic.Wii_Classic(i2c)

	while True:
		left_x, left_y = ctrl_pad.joystick_l
		right_x, right_y = ctrl_pad.joystick_r
		left_pressure = ctrl_pad.l_shoulder.LEFT_FORCE
		right_pressure = ctrl_pad.r_shoulder.RIGHT_FORCE
		print("joystick_l = {},{}".format(left_x, left_y))
		print("joystick_r = {},{}".format(right_X, left_y))
		print("left shoulder = {}".format(left_pressure))
		print("right shoulder = {}".format(right_pressure))
		if ctrl_pad.buttons.A:
			print("button A")
		if ctrl_pad.buttons.B:
			print("button B")
		if ctrl_pad.d_pad.UP:
			print("d_pad Up")
		time.sleep(0.5)

Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/wii_classic/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_Wii_Classic/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-wii-classic",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,wii_classic,wii,classic,remote,control",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/2d/78/616da8fefd04170f86aa97af87dc66ce5aa46b2537b4fa8ebb3e7101f9e3/adafruit-circuitpython-wii-classic-1.0.5.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-wii-classic/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/wii_classic/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_Wii_Classic/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_Wii_Classic/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\nCircuitPython library for Nintendo Wii Classic controllers.\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\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\nWorks with the Wii Nunchuck Breakout Adapter and a Wii Classic Controller.\n\n`Purchase one from the Adafruit shop <http://www.adafruit.com/products/4836>`_.\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/Adafruit-circuitpython-wii-classic/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-wii-classic\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-wii-classic\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .env/bin/activate\n    pip3 install Adafruit-circuitpython-wii-classic\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_wii_classic\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n    circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n\timport time\n\timport board\n\timport adafruit_wii_classic\n\n\ti2c = board.STEMMA_I2C()\n\tctrl_pad = adafruit_wii_classic.Wii_Classic(i2c)\n\n\twhile True:\n\t\tleft_x, left_y = ctrl_pad.joystick_l\n\t\tright_x, right_y = ctrl_pad.joystick_r\n\t\tleft_pressure = ctrl_pad.l_shoulder.LEFT_FORCE\n\t\tright_pressure = ctrl_pad.r_shoulder.RIGHT_FORCE\n\t\tprint(\"joystick_l = {},{}\".format(left_x, left_y))\n\t\tprint(\"joystick_r = {},{}\".format(right_X, left_y))\n\t\tprint(\"left shoulder = {}\".format(left_pressure))\n\t\tprint(\"right shoulder = {}\".format(right_pressure))\n\t\tif ctrl_pad.buttons.A:\n\t\t\tprint(\"button A\")\n\t\tif ctrl_pad.buttons.B:\n\t\t\tprint(\"button B\")\n\t\tif ctrl_pad.d_pad.UP:\n\t\t\tprint(\"d_pad Up\")\n\t\ttime.sleep(0.5)\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/wii_classic/en/latest/>`_.\n\nFor information on building library documentation, please check out\n`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_Wii_Classic/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython library for Nintendo Wii Classic controllers.",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_Wii_Classic"
    },
    "split_keywords": [
        "adafruit",
        "blinka",
        "circuitpython",
        "micropython",
        "wii_classic",
        "wii",
        "classic",
        "remote",
        "control"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3e311749e261fd71601c4e66e7fb182d691f10a5b44ee86fa558bbb359c282f",
                "md5": "acf5f3b0f982d0f589af19c9b781433c",
                "sha256": "5fc114ce96dff288511c5a22d2bed91b73c3536fbbe1f085d10c4d0abb90b289"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_wii_classic-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "acf5f3b0f982d0f589af19c9b781433c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6024,
            "upload_time": "2023-12-09T17:36:55",
            "upload_time_iso_8601": "2023-12-09T17:36:55.890955Z",
            "url": "https://files.pythonhosted.org/packages/a3/e3/11749e261fd71601c4e66e7fb182d691f10a5b44ee86fa558bbb359c282f/adafruit_circuitpython_wii_classic-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d78616da8fefd04170f86aa97af87dc66ce5aa46b2537b4fa8ebb3e7101f9e3",
                "md5": "279c7071abdf8ed2b1066af6b6bf21a6",
                "sha256": "a54ca47500edbc3c7c0c6a6f98af140694e59b7c509034f3403a317237c32328"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-wii-classic-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "279c7071abdf8ed2b1066af6b6bf21a6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 32823,
            "upload_time": "2023-12-09T17:36:57",
            "upload_time_iso_8601": "2023-12-09T17:36:57.324245Z",
            "url": "https://files.pythonhosted.org/packages/2d/78/616da8fefd04170f86aa97af87dc66ce5aa46b2537b4fa8ebb3e7101f9e3/adafruit-circuitpython-wii-classic-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:36:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_Wii_Classic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-wii-classic"
}
        
Elapsed time: 0.32678s