Package: 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 buyPimoroni Automation HAT:https://shop.pimoroni.com/products/automation-hatPimoroni Automation HAT Mini:https://shop.pimoroni.com/products/automation-hat-mini[DISCONTINUED] Pimoroni Automation pHAT:https://shop.pimoroni.com/products/automation-phatInstallingFull 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:In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:curlhttps://get.pimoroni.com/automationhat|bashAlternatively, on Raspbian, you can download thepimoroni-dashboardand install your product by browsing to the relevant entry:sudoapt-getinstallpimoroni(you will find the Dashboard under 'Accessories' too, in the Pi menu - or just runpimoroni-dashboardat the command line)If you choose to download examples you'll find them in/home/pi/Pimoroni/automationhat/.Manual installLibrary install for Python 3on Raspbian:sudoapt-getinstallpython3-automationhatother environments:sudopip3installautomationhatLibrary install for Python 2on Raspbian:sudoapt-getinstallpython-automationhatother environments:sudopip2installautomationhatDevelopmentIf you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository,cdto the library directory, and run:sudopython3setup.pyinstall(orsudo python setup.py installwhichever your primary Python environment may be)In all cases you will have to enable the i2c bus.Documentation & SupportGuides and tutorials:Automation HAT:https://learn.pimoroni.com/automation-hatAutomation pHAT:https://learn.pimoroni.com/automation-phatAutomation HAT Mini:https://learn.pimoroni.com/automation-hat-miniFunction referencehttps://github.com/pimoroni/automation-hat/tree/master/documentationGPIO Pinout:Automation HAT:https://pinout.xyz/pinout/automation_hatAutomation pHAT:https://pinout.xyz/pinout/automation_phatAutomation HAT Mini:https://pinout.xyz/pinout/automation_hat_miniGet helphttp://forums.pimoroni.com/c/supportFAQWhat is the accuracy and resolution of the Automation HATThe 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/3Changelog0.4.1Update for SN3218 v2.0.00.4.0Switch to ADS1X15 library0.3.0Switch to setup.cfgSwitch to markdown based READMESupport for ADS1115 board variant0.2.30.2.2 + bump for newer examples0.2.2Had ST7789 on the brain, swapped for ST77350.2.1Add dependency on ST7789 for AMH0.2.0Fix: Fix thread interleaving and race conditions leading to spurious ADC readingsFix: Switch to non-deprecated alias of thread.isAlive0.1.0Fix: Defer setup to avoid import side effectsFix: Slowed LED update rateImprovement: Switched to warnings to notify about unsupported features on pHAT0.0.4Fix for HAT/pHAT detection0.0.3Fix for Python 3 support0.0.2Added pHAT supportRounded ADC output to 2 decimal placesSet initial state for outputs and fixed togglingFixed light toggling0.0.1Initial Release