This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This package provides the necessary code to interface the Raspberry Pi HATs(add-on boards) from raspihats.com:

Typical usage often looks like this:

#!/usr/bin/env python
# In this setup there are two I2C-HATs stacked, one Di16 and one Rly10.
from raspihats.i2c_hats import Di16, Rly10

di16 = Di16(0x40)   # 0x40 is the I2C bus address
rly10 = Rly10(0x50) # 0x50 is the I2C bus address
# The I2C-HAT address high nibble is fixed(0x4 for Di16, 0x5 for Rly10), the low nibble
# value is set using the on-board address jumper, range is [0x0 .. 0xF].

while True:
    state = di16.di_get_channel_state('Di1.1')
    rly10.do_set_channel_state('Rly1', state)
    rly10.do_set_channel_state('Rly2', not state)

Note

Every I2CHat object is practically a thread, this thread is used to feed the I2C-HAT communication watchdog(CWDT). Failing to feed the CWDT will result in a CWDT timeout which depending on the I2CHat type can have different consequences. By default the CWDT is disabled and the feed thread is not started, advanced users can enable both using the cwdt_start_feed_thread() method.

Installation

Install dependencies

The python-smbus package

$ sudo apt-get install python-smbus
# or if using python 3
$ sudo apt-get install python3-smbus

Install from repository

# Make sure you have git, pip and setuptools installed
$ git clone git@github.com:raspihats/raspihats.git
$ cd raspihats
$ sudo python setup.py install
# or if using python 3
$ sudo python3 setup.py install

Install using pip

# Make sure you have pip and setuptools installed
$ sudo pip install raspihats
# or if using python 3
$ sudo pip3 install raspihats

Checkout raspihats.com

Release History

Release History

1.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
raspihats-1.1.1.tar.gz (15.1 kB) Copy SHA256 Checksum SHA256 Source Jul 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting