Skip to main content

Image HAT

Project description

PyPI - Status PyPI - License PyPI - Python Versions PyPI - Version PyPI - Downloads

Image HAT

Image-HAT 3D

Installation

Install dependencies

The python3-smbus package

$ sudo apt install python3-smbus

Install using pip

$ sudo pip3 install -U imagehat

Listing attributes and methods

#!/usr/bin/env python3
from imagehat import ImageHat

hat = ImageHat(0x20) # 0x20 is the I2C bus address

hat.host             # get selected host
hat.host = 0         # unplug USB device
hat.host = 1         # assign USB device to host 1
hat.host = 2         # assign USB device to host 2

hat.host2_power      # get power state of host 2

hat.ext_in           # get state of external input

hat.ext_out          # get state of external output
hat.ext_out = 0      # turn off external output
hat.ext_out = 1      # turn on external output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imagehat-0.0.28.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

imagehat-0.0.28-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page