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
- Methods
- 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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca6415d9c0dc06c3bc055b2af5f0a1c76c4665396d89600bf12a5c82d703a2f4 |
|
MD5 | 2417d2f815f27da97f7f92ab007f5a00 |
|
BLAKE2b-256 | c0dce49fc12899216c9d16d1b4d5cbca163c2d605ae82a9785678c2a13b9c0cc |
Close
Hashes for greenponik_waterpump_driver-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18a9daf9d2fd040ec1749c0364dbcb9f37a8012f95bd9460aa284c32b07b3c9a |
|
MD5 | 6cbe452a62aedf5eee8773c5e42de05e |
|
BLAKE2b-256 | 832dce6c47fe28240e276b0225032c544f1ddf10c873fa991821c161e267549e |