Image HAT
Project description
Image HAT
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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file imagehat-0.0.28.tar.gz
.
File metadata
- Download URL: imagehat-0.0.28.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3bd02f809393828a44ba225f161e622795d35cd6061e2e59c075e9770faea8b |
|
MD5 | 0df4ff04bcf2d1a5b1112dc558aa438d |
|
BLAKE2b-256 | a14fd4641ae49069c511fe209347bc1700b83d8d44b20e09c2cb8d862f7b5407 |
File details
Details for the file imagehat-0.0.28-py3-none-any.whl
.
File metadata
- Download URL: imagehat-0.0.28-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5e816b737596cf907d2b4772d0d4a939fb8629105db6408e51e8274ed873c47 |
|
MD5 | 374321a2fdb93d5db4efef37631948e8 |
|
BLAKE2b-256 | 954e01425d38985b5706054167aed771272d168312db3aed319e19260f1be1a0 |