inventorhatmini


Nameinventorhatmini JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryLibrary for the Pimoroni Inventor HAT Mini
upload_time2024-06-06 13:41:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Pimoroni Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords pi raspberry
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Inventor HAT Mini

[![Build Status](https://img.shields.io/github/actions/workflow/status/pimoroni/inventorhatmini-python/test.yml?branch=main)](https://github.com/pimoroni/inventorhatmini-python/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/pimoroni/inventorhatmini-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/inventorhatmini-python?branch=master)
[![PyPi Package](https://img.shields.io/pypi/v/inventorhatmini.svg)](https://pypi.python.org/pypi/inventorhatmini)
[![Python Versions](https://img.shields.io/pypi/pyversions/inventorhatmini.svg)](https://pypi.python.org/pypi/inventorhatmini)

A versatile motor, servo and audio driver HAT for Raspberry Pi. Bring your mechanical inventions, creations and contraptions to life!

**Buy it from:** https://shop.pimoroni.com/products/inventor-hat-mini


# Getting the Library

**Stable library only (no examples) from PyPi:**

* Just run `sudo python3 -m pip install inventorhatmini`

This will install the library under the root user. This is required to use Inventor HAT Mini's RGB LEDs, which rely on the [rpi_ws281x package](https://pypi.org/project/rpi-ws281x/).

In some cases you may need to install pip with: `sudo apt install python3-pip`

**Stable library, with latest examples from GitHub:**

* `git clone https://github.com/pimoroni/inventorhatmini-python`
* `cd inventorhatmini-python`
* `./install.sh`

**Latest/development library and examples from GitHub:**

* `git clone https://github.com/pimoroni/inventorhatmini-python`
* `cd inventorhatmini-python`
* `./install.sh --unstable`

# Configuring your Raspberry Pi

## Enable I2C

In order to use the motor, servo, and IO features of Inventor HAT Mini, you need to enable the I2C interface of your Raspberry Pi. This can be done in the terminal by running:

* `sudo raspi-config nonint do_i2c 0`

Alternatively, you can enable the I2C interface by:
* running `sudo raspi-config` and enabling the option under **Interfacing Options**.
* opening the graphical **Raspberry Pi Configuration** application from the **Preferences** menu.

You may need to reboot after enabling I2C for the change to take effect.

## Increase I2C Baudrate

To get the most out of your Inventor HAT Mini it is recommended to run your Raspberry Pi with a higher I2C baudrate than the default 100KHz. This can be done by modifying your Pi's configuration file. To do this run `sudo nano /boot/config.txt` to open a terminal text editor.

Within the editor navigate to the line `dtparam=i2c_arm=on`. If this says `off` or is commented out with a `#`, use this opportunity to change it. Now insert the following line below it, `dtparam=i2c_baudrate=400000` to increase the baudrate.

When you are finished modifying the file, press **CTRL+X** on your keyboard, then when asked to `Save modified buffer?` press **Y**.

Reboot after this for the change to take effect.


## Enable Audio

To use the audio output of your Inventor HAT Mini you will need to modifying your Pi's configuration file. To do this run `sudo nano /boot/config.txt` to open a terminal text editor.

Within the editor navigate to the bottom of the file and include the lines `dtoverlay=hifiberry-dac` and `gpio=25=op,dh`. The first line switches the audio to use the GPIO header of your Pi for audio output, and the second line will cause your Pi to enable the audio output on boot, by setting pin BCM 25 to high. Then navigate up to the line `dtparam=i2s=on`. If this says `off` or is commented out with a `#`, uncomment it and change it to `on`.

Depending on your setup, you may also need to disable other audio outputs of your Pi (for example audio over HDMI). Look through the file for any existing mention to `dtparam=audio=on` and change it to `dtparam=audio=off`. There may the line `dtoverlay=vc4-kms-v3d`. Modify this to be `dtoverlay=vc4-kms-v3d,noaudio`.

When you are finished modifying the file, press **CTRL+X** on your keyboard, then when asked to `Save modified buffer?` press **Y**.

Reboot after this for the change to take effect.

# Examples and Usage

There are many examples to get you started with your Inventor HAT Mini. With the library installed on your Raspberry Pi, these can be found in the `~/Pimoroni/inventorhatmini/examples` directory. Details about what each one does can be found in the [examples readme](/examples/README.md).

To take Inventor HAT Mini further, the full API is described in the [library reference](/REFERENCE.md).


# Removing the Library

To uninstall the library only (keeping all examples):

* Just run `sudo python3 -m pip uninstall inventorhatmini`

Or if you have grabbed the library from Github:

* `cd inventorhatmini-python`
* `./uninstall.sh`

1.0.0
-----

* Port to gpiod/gpiodevice for Pi 5
* Use dummy LEDs for Pi 5

0.0.1
-----

* Initial Release

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "inventorhatmini",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Christopher Parrott <chris@pimoroni.com>, Philip Howard <phil@pimoroni.com>",
    "keywords": "Pi, Raspberry",
    "author": null,
    "author_email": "Christopher Parrott <chris@pimoroni.com>",
    "download_url": "https://files.pythonhosted.org/packages/8c/9b/ebe0885e6018b5454741873d442bf29d3ac28238c2e0090579738364d737/inventorhatmini-1.0.0.tar.gz",
    "platform": null,
    "description": "# Inventor HAT Mini\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pimoroni/inventorhatmini-python/test.yml?branch=main)](https://github.com/pimoroni/inventorhatmini-python/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pimoroni/inventorhatmini-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/inventorhatmini-python?branch=master)\n[![PyPi Package](https://img.shields.io/pypi/v/inventorhatmini.svg)](https://pypi.python.org/pypi/inventorhatmini)\n[![Python Versions](https://img.shields.io/pypi/pyversions/inventorhatmini.svg)](https://pypi.python.org/pypi/inventorhatmini)\n\nA versatile motor, servo and audio driver HAT for Raspberry Pi. Bring your mechanical inventions, creations and contraptions to life!\n\n**Buy it from:** https://shop.pimoroni.com/products/inventor-hat-mini\n\n\n# Getting the Library\n\n**Stable library only (no examples) from PyPi:**\n\n* Just run `sudo python3 -m pip install inventorhatmini`\n\nThis will install the library under the root user. This is required to use Inventor HAT Mini's RGB LEDs, which rely on the [rpi_ws281x package](https://pypi.org/project/rpi-ws281x/).\n\nIn some cases you may need to install pip with: `sudo apt install python3-pip`\n\n**Stable library, with latest examples from GitHub:**\n\n* `git clone https://github.com/pimoroni/inventorhatmini-python`\n* `cd inventorhatmini-python`\n* `./install.sh`\n\n**Latest/development library and examples from GitHub:**\n\n* `git clone https://github.com/pimoroni/inventorhatmini-python`\n* `cd inventorhatmini-python`\n* `./install.sh --unstable`\n\n# Configuring your Raspberry Pi\n\n## Enable I2C\n\nIn order to use the motor, servo, and IO features of Inventor HAT Mini, you need to enable the I2C interface of your Raspberry Pi. This can be done in the terminal by running:\n\n* `sudo raspi-config nonint do_i2c 0`\n\nAlternatively, you can enable the I2C interface by:\n* running `sudo raspi-config` and enabling the option under **Interfacing Options**.\n* opening the graphical **Raspberry Pi Configuration** application from the **Preferences** menu.\n\nYou may need to reboot after enabling I2C for the change to take effect.\n\n## Increase I2C Baudrate\n\nTo get the most out of your Inventor HAT Mini it is recommended to run your Raspberry Pi with a higher I2C baudrate than the default 100KHz. This can be done by modifying your Pi's configuration file. To do this run `sudo nano /boot/config.txt` to open a terminal text editor.\n\nWithin the editor navigate to the line `dtparam=i2c_arm=on`. If this says `off` or is commented out with a `#`, use this opportunity to change it. Now insert the following line below it, `dtparam=i2c_baudrate=400000` to increase the baudrate.\n\nWhen you are finished modifying the file, press **CTRL+X** on your keyboard, then when asked to `Save modified buffer?` press **Y**.\n\nReboot after this for the change to take effect.\n\n\n## Enable Audio\n\nTo use the audio output of your Inventor HAT Mini you will need to modifying your Pi's configuration file. To do this run `sudo nano /boot/config.txt` to open a terminal text editor.\n\nWithin the editor navigate to the bottom of the file and include the lines `dtoverlay=hifiberry-dac` and `gpio=25=op,dh`. The first line switches the audio to use the GPIO header of your Pi for audio output, and the second line will cause your Pi to enable the audio output on boot, by setting pin BCM 25 to high. Then navigate up to the line `dtparam=i2s=on`. If this says `off` or is commented out with a `#`, uncomment it and change it to `on`.\n\nDepending on your setup, you may also need to disable other audio outputs of your Pi (for example audio over HDMI). Look through the file for any existing mention to `dtparam=audio=on` and change it to `dtparam=audio=off`. There may the line `dtoverlay=vc4-kms-v3d`. Modify this to be `dtoverlay=vc4-kms-v3d,noaudio`.\n\nWhen you are finished modifying the file, press **CTRL+X** on your keyboard, then when asked to `Save modified buffer?` press **Y**.\n\nReboot after this for the change to take effect.\n\n# Examples and Usage\n\nThere are many examples to get you started with your Inventor HAT Mini. With the library installed on your Raspberry Pi, these can be found in the `~/Pimoroni/inventorhatmini/examples` directory. Details about what each one does can be found in the [examples readme](/examples/README.md).\n\nTo take Inventor HAT Mini further, the full API is described in the [library reference](/REFERENCE.md).\n\n\n# Removing the Library\n\nTo uninstall the library only (keeping all examples):\n\n* Just run `sudo python3 -m pip uninstall inventorhatmini`\n\nOr if you have grabbed the library from Github:\n\n* `cd inventorhatmini-python`\n* `./uninstall.sh`\n\n1.0.0\n-----\n\n* Port to gpiod/gpiodevice for Pi 5\n* Use dummy LEDs for Pi 5\n\n0.0.1\n-----\n\n* Initial Release\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Pimoroni Ltd.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Library for the Pimoroni Inventor HAT Mini",
    "version": "1.0.0",
    "project_urls": {
        "GitHub": "https://www.github.com/pimoroni/inventorhatmini-python",
        "Homepage": "https://www.pimoroni.com"
    },
    "split_keywords": [
        "pi",
        " raspberry"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37b0041e2e10a65d3bed9d965189d37597388c6cac1d53c2a20cc84b34d65448",
                "md5": "c05f009e43eedc04d79f867fc180dd6a",
                "sha256": "52be9533864c842b90d1ec35337834d44467c67e9162052e5ef3358908a80093"
            },
            "downloads": -1,
            "filename": "inventorhatmini-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c05f009e43eedc04d79f867fc180dd6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 215474,
            "upload_time": "2024-06-06T13:41:35",
            "upload_time_iso_8601": "2024-06-06T13:41:35.298961Z",
            "url": "https://files.pythonhosted.org/packages/37/b0/041e2e10a65d3bed9d965189d37597388c6cac1d53c2a20cc84b34d65448/inventorhatmini-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c9bebe0885e6018b5454741873d442bf29d3ac28238c2e0090579738364d737",
                "md5": "50e225ee860dbcbb99b011c1a63b919e",
                "sha256": "e6662d56755ba37d5f3ae3dcd7ad5b0b00d5c283f424905c026143f3f4c70ea3"
            },
            "downloads": -1,
            "filename": "inventorhatmini-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "50e225ee860dbcbb99b011c1a63b919e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 199395,
            "upload_time": "2024-06-06T13:41:37",
            "upload_time_iso_8601": "2024-06-06T13:41:37.171484Z",
            "url": "https://files.pythonhosted.org/packages/8c/9b/ebe0885e6018b5454741873d442bf29d3ac28238c2e0090579738364d737/inventorhatmini-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-06 13:41:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pimoroni",
    "github_project": "inventorhatmini-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "inventorhatmini"
}
        
Elapsed time: 0.45191s