This is the Java driver for the Pimoroni Automation HAT.
The primary driver behind this project (and its predecessor, mqtt-automation-hat-go is the Home Climate Control project.
- Run
raspi-config
and enableI2C
in Interfacing Options; - Run
sudo apt install wiringpi
git clone https://github.com/home-climate-control/automation-hat-driver.git && \
cd automation-hat-driver && \
./gradlew build
Tests are configured in such a way that they will not run on any platform other than Raspberry Pi. Moreover, they have to be explicitly enabled (you don't want tests to fiddle with expensive hardware that the HAT controls). There is a bug in Gradle that requires special treatment - Gradle daemon has to be disabled for running tests:
TEST_AUTOMATION_HAT=safe ./gradlew --no-daemon cleanTest test
If in doubt, drop a note to Home Climate Control user forum, help will come fast.