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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f347c4dc94965732c3079aeb66d4bd47f2f602d5bac666f6dd3342dce8eecb5d |
|
MD5 | d3de69bf6d6248e82a045e665d8a25ba |
|
BLAKE2b-256 | d7981b893aa13ab4123527c26eb37bebf5f93213ee8ea5c7287cdbbc65d36bde |
Close
Hashes for greenponik_waterpump_driver-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 836579cdfaf14b1816538e274240f0008345c1f2e2d4c8211232dc034abaab25 |
|
MD5 | b34c4c3a82e2a7a97062121f6665d2c2 |
|
BLAKE2b-256 | 7def0925e745b10fa83feeff707bc5622be4fc5b0f50b3c65a70a4421824957e |