Skip to content

Commit

Permalink
Merge pull request #43 from pimoroni/patch-v0.3.0
Browse files Browse the repository at this point in the history
Prep for v0.3.0
  • Loading branch information
Gadgetoid authored Sep 3, 2021
2 parents c2e503a + dbdd6b3 commit 087a22b
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 120 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ usage:
@echo "install: install the library locally from source"
@echo "uninstall: uninstall the local library"
@echo "check: peform basic integrity checks on the codebase"
@echo "python-readme: generate library/README.rst from README.md"
@echo "python-readme: generate library/README.md from README.md"
@echo "python-wheels: build python .whl files for distribution"
@echo "python-sdist: build python source distribution"
@echo "python-clean: clean python build and dist directories"
Expand Down
12 changes: 12 additions & 0 deletions library/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
0.3.0
-----

* Switch to setup.cfg
* Switch to markdown based README
* Support for ADS1115 board variant

0.2.3
-----

* 0.2.2 + bump for newer examples

0.2.2
-----

Expand Down
2 changes: 1 addition & 1 deletion library/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include CHANGELOG.txt
include LICENSE.txt
include README.rst
include README.md
include setup.py
include automationhat/*.py
167 changes: 167 additions & 0 deletions library/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
![Automation HAT](autohat_360.png)

[![Build Status](https://travis-ci.com/pimoroni/automation-hat.svg?branch=master)](https://travis-ci.com/pimoroni/automation-hat)
[![Coverage Status](https://coveralls.io/repos/github/pimoroni/automation-hat/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/automation-hat?branch=master)
[![PyPi Package](https://img.shields.io/pypi/v/automationhat.svg)](https://pypi.python.org/pypi/automationhat)
[![Python Versions](https://img.shields.io/pypi/pyversions/automationhat.svg)](https://pypi.python.org/pypi/automationhat)

Automation HAT is a home monitoring and automation controller featuring relays, analog channels, powered outputs, and buffered inputs (all 24V tolerant). This library will also work with Automation HAT's smaller siblings - Automation pHAT and Automation HAT Mini.

### Where to buy

* Pimoroni Automation HAT: <https://shop.pimoroni.com/products/automation-hat>
* Pimoroni Automation HAT Mini: <https://shop.pimoroni.com/products/automation-hat-mini>
* [DISCONTINUED] Pimoroni Automation pHAT: <https://shop.pimoroni.com/products/automation-phat>

## Installing

### Full install (recommended)

We've created an easy installation script that will install all pre-requisites and get your Automation HAT, pHAT or HAT Mini
up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal
on your Raspberry Pi desktop, as illustrated below:

![Finding the terminal](http://get.pimoroni.com/resources/github-repo-terminal.png)

In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:

```bash
curl https://get.pimoroni.com/automationhat | bash
```

Alternatively, on Raspbian, you can download the `pimoroni-dashboard` and install your product by browsing to the relevant entry:

```bash
sudo apt-get install pimoroni
```

(you will find the Dashboard under 'Accessories' too, in the Pi menu - or just run `pimoroni-dashboard` at the command line)

If you choose to download examples you'll find them in `/home/pi/Pimoroni/automationhat/`.

### Manual install

#### Library install for Python 3

on Raspbian:

```bash
sudo apt-get install python3-automationhat
```

other environments:

```bash
sudo pip3 install automationhat
```

#### Library install for Python 2

on Raspbian:

```bash
sudo apt-get install python-automationhat
```

other environments:

```bash
sudo pip2 install automationhat
```

### Development

If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository, `cd` to the library directory, and run:

```bash
sudo python3 setup.py install
```

(or `sudo python setup.py install` whichever your primary Python environment may be)

In all cases you will have to enable the i2c bus.

## Documentation & Support

* Guides and tutorials:
* Automation HAT: <https://learn.pimoroni.com/automation-hat>
* Automation pHAT: <https://learn.pimoroni.com/automation-phat>
* Automation HAT Mini: <https://learn.pimoroni.com/automation-hat-mini>
* Function reference
<https://github.com/pimoroni/automation-hat/tree/master/documentation>
* GPIO Pinout:
* Automation HAT: <https://pinout.xyz/pinout/automation_hat>
* Automation pHAT: <https://pinout.xyz/pinout/automation_phat>
* Automation HAT Mini: <https://pinout.xyz/pinout/automation_hat_mini>
* Get help
<http://forums.pimoroni.com/c/support>

### FAQ

#### What is the accuracy and resolution of the Automation HAT

The ADS1015 is a 12-bit ADC, but since the 12th bit is the sign-bit there are only 11-bits of resolution available for positive voltage readings. The input voltage for 24v channels is scaled from 0-25.85v (25.85 rather than 24 due to how the resistor divider is set up) to 0-3.3v.

Since the full-scale range of the ADC is set to 4.096v, this means that 0-3.3v gives only ~1649 possible usable values making the input measurement granularity somewhere around 0.015v (25.85 / 1649) for the 24v inputs and 0.002v for the 3.3v input.

More information on this topic can be found here: <https://forums.pimoroni.com/t/automation-hat-accuracy/7252/3>

# Changelog
0.3.0
-----

* Switch to setup.cfg
* Switch to markdown based README
* Support for ADS1115 board variant

0.2.3
-----

* 0.2.2 + bump for newer examples

0.2.2
-----

* Had ST7789 on the brain, swapped for ST7735

0.2.1
-----

* Add dependency on ST7789 for AMH

0.2.0
-----

* Fix: Fix thread interleaving and race conditions leading to spurious ADC readings
* Fix: Switch to non-deprecated alias of thread.isAlive

0.1.0
-----

* Fix: Defer setup to avoid import side effects
* Fix: Slowed LED update rate
* Improvement: Switched to warnings to notify about unsupported features on pHAT

0.0.4
-----

* Fix for HAT/pHAT detection

0.0.3
-----

* Fix for Python 3 support

0.0.2
-----

* Added pHAT support
* Rounded ADC output to 2 decimal places
* Set initial state for outputs and fixed toggling
* Fixed light toggling

0.0.1
-----

* Initial Release

115 changes: 0 additions & 115 deletions library/README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion library/automationhat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .ads1015 import ads1015
from .pins import ObjectCollection, AsyncWorker, StoppableThread

__version__ = '0.2.2'
__version__ = '0.3.0'


RELAY_1 = 13
Expand Down
2 changes: 1 addition & 1 deletion library/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
[metadata]
name = automationhat
version = 0.2.2
version = 0.3.0
author = Philip Howard
author_email = [email protected]
description = Automation HAT Driver
Expand Down
2 changes: 1 addition & 1 deletion library/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,35,36},qa
envlist = py{27,35,37,39},qa
skip_missing_interpreters = True

[testenv]
Expand Down

0 comments on commit 087a22b

Please sign in to comment.