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"],
100,
3000
)
time.sleep(2)
driver.set_pump_command(
driver.I2C_REGISTERS["PUMP_1_STATE"],
driver.I2C_COMMANDS["OFF"],
0,
0
)
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.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2822a7e7d458977d6fc5fa72f6ebaeb5df7b9a5ed57d7604c74189c1bec256b7 |
|
MD5 | 6b9dbdac7e4fcb578222ab1b884bf13e |
|
BLAKE2b-256 | abb0a8c7761ce1573846b59de71fee08f95818600237707a71413bfacea45fdb |
Close
Hashes for greenponik_waterpump_driver-0.0.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0947adfd58ee54fafd524f80caa80afdfa0ab0c1d51ae8b9771c0b56078116d |
|
MD5 | 413ab8e664f86a31e12ce15435c3989c |
|
BLAKE2b-256 | ce8c095e4737f6fa7a2de400fa5685c79a3cbb7838b2245c011d53e501cc44bb |