GreenPonik WaterPump i2c driver
Project description
GreenPonik_WaterPump_Driver.py Library for Raspberry pi
A python3 class to manage GreenPonik WaterPump devices
! Only tested on Raspberry Pi 3 A+ !
Table of Contents
- GreenPonik_WaterPump_Driver.py Library for Raspberry pi
- Table of Contents
- Installation
- Examples
- Credits
Installation
> git clone https://github.com/GreenPonik/GreenPonik_WaterPump_Driver.git
cd GreenPonik_WaterPump_Driver
pip3 install -r requirements.txt
or
> pip3 install greenponik-waterpump-driver
from GreenPonik_WaterPump_Driver.WaterPumpDriver import WaterPumpDriver
Example
import time
from GreenPonik_WaterPump_Driver.WaterPumpDriver import WaterPumpDriver
if __name__ == "__main__":
# run pump one during 2sec
try:
with WaterPumpDriver() as driver: # default bus=1, default address=0x01
print("My UUIDis : %s" % driver.get_uuid())
driver.set_pump_command(
driver.I2C_REGISTERS["PUMP_1_STATE"],
driver.I2C_COMMANDS["ON"],
)
time.sleep(2)
driver.set_pump_command(
driver.I2C_REGISTERS["PUMP_1_STATE"],
driver.I2C_COMMANDS["OFF"],
)
except Exception as e:
print("Exception occured", e)
go to examples
Credits
Write by Mickael Lehoux, from GreenPonik, 2020
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
Built Distribution
Close
Hashes for greenponik-waterpump-driver-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2094fb2078941cac278e4d5bf7cd39bb7d09b126a74aaa103f9a6fc8ce864e14 |
|
MD5 | d672530c6b4b52e2390d7710ea8fdc38 |
|
BLAKE2b-256 | 87abd1b31a6d8e2120744850a4ea8e31dc40e084a68fda8f8fe2cc8e9cd11d38 |
Close
Hashes for greenponik_waterpump_driver-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b3d4d41f0fdf688d15173894eb43fc2ac99c323c6227109389296efa9a371c2 |
|
MD5 | 532ff1f06305b1ac8b9263d5271713a3 |
|
BLAKE2b-256 | 6b1e386d257512c118714a20a5b042f9a66c1a6bdc15c500e9c50b5504095b38 |