Our intention is to design an oriented object access to the lifepo4wered-pi3 data module during runtime application.
Project description
Lifepo4weredPyController
========================
.. image:: https://travis-ci.org/fredericklussier/Lifepo4weredPyController.svg?branch=master
:target: https://travis-ci.org/fredericklussier/Lifepo4weredPyController
.. image:: https://coveralls.io/repos/github/fredericklussier/Lifepo4weredPyController/badge.svg?branch=master
:target: https://coveralls.io/github/fredericklussier/Lifepo4weredPyController?branch=master
.. image:: https://api.codeclimate.com/v1/badges/809cf25fc925a3ed8ef2/maintainability
:target: https://codeclimate.com/github/fredericklussier/Lifepo4weredPyController/maintainability
:alt: Maintainability
.. image:: https://badge.fury.io/py/lifepo4weredPyController.svg
:target: https://badge.fury.io/py/lifepo4weredPyController
Our intention is to design an oriented object access to the lifepo4wered-pi3 data module during runtime application.
reference: http://lifepo4wered.com/lifepo4wered-pi3.html
Using the Raspbery Pi zero in many projects, I found this product
very usefull. So to help my child and python colleagues, we design this.
You can find here the documentation of the lifepo4wered product:
http://lifepo4wered.com/files/LiFePO4wered-Pi3-Product-Brief.pdf.
Status
------
In development
Installation
------------
If you want to use this wrapper, you need:
Not yet, but we will have one, soon.
To dowload and install the LiFePO4wered-Pi drivers and CLI applications,
please read https://github.com/xorbit/LiFePO4wered-Pi.
Features (working on)
---------------------
* Oriented object definition
* Observable elements, so subscribed observers will know when data change
* Periodically read data,
* Python 3.5 and 3.6
* Hardly tested
Detail:
^^^^^^
classes
"""""""
The idea is to use oriented object mechanism to control the LiFePO4wered-Pi variables.
We have distributated LiFePO4wered-Pi variables in different classes:
* Battery (VBAT)
* Led (LED_STATE)
* Touch (TOUCH_STATE)
* WakeTimer (WAKE_TIME)
* USBPowerSource (VIN)
**What about others variables?**
Well! must of them, we just not there yet.
But we think that some of variables are factoring issue (not to use in a runtime environment)
and the provided CLI works perfectly for them.
Like:
* I2C_REG_VER
* I2C_ADDRESS
* DCO_RSEL
* DCO_DCOMOD
* CFG_WRITE
basic usage
*****************
.. code-block:: python
import time
import lifepo4weredPyController
@lifepo4weredPyController.battery.observeElement("rate")
def printRate(previous, actual):
print("previously:{0}, now:{1}".format(previous, actual))
try:
print(lifepo4weredPyController.battery.voltage)
# keep main process alive, so observers will receive changes
while True:
time.sleep(0.1)
except KeyboardInterrupt:
myLifepo4wered.ceaseReading()
print('stopped!')
lifepo4weredPyController.wakeUp = 60 # boot in 1 hour after shutdown
Legendary
*********
* **properies:** name of class property
* **aka:** name used by the LiFePO4wered-Pi variables
* **access:** provide the access of the data of the variable. read means it reads the data from LiFePO4wered and write means it writes value to LiFePO4wered.
* **Periodicaly read:** at interval, this data is read so observers will be notified of any changes
* **na:** not applicable
+-------------------------------------------------------------------------------+
| **Battery** |
+-------------------------------+-----------+------------+----------------------+
| **properies** | **aka** | **access** | **Periodicaly read** |
+===============================+===========+============+======================+
| voltage | VBAT | read only | True |
+-------------------------------+-----------+------------+----------------------+
| rate' | na | read only | True |
+-------------------------------+-----------+------------+----------------------+
'rate: Will give the battery pourcentage
+-------------------------------------------------------------------------------+
| **USBPowerSource** |
+===============================+===========+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-----------+------------+----------------------+
| voltage | VIN | read only | True |
+-------------------------------+-----------+------------+----------------------+
| pluggedIn' | na | read only | True |
+-------------------------------+-----------+------------+----------------------+
'pluggedIn: Will mention is the usb connector is plug to a power source
+-------------------------------------------------------------------------------+
| **Led** |
+-------------------------------+-----------+------------+----------------------+
| **properies** | **aka** | **access** | **Periodicaly read** |
+===============================+===========+============+======================+
| state | LED_STATE | read/write | True |
+-------------+-----------------+-----------+------------+----------------------+
| **methods** | |
+-------------+-----------------------------------------------------------------+
| on | set on the led |
+-------------+-----------------------------------------------------------------+
| off | set off the led |
+-------------+-----------------------------------------------------------------+
| pulse | led pulsing |
+-------------+-----------------------------------------------------------------+
| flash | led flashing |
+-------------+-----------------------------------------------------------------+
+---------------------------------------------------------------------------------+
| **Touch** |
+===============================+=============+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-------------+------------+----------------------+
| state | TOUCH_STATE | read only | true |
+-------------------------------+-------------+------------+----------------------+
+-------------------------------------------------------------------------------+
| **WakeTimer** |
+===============================+===========+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-----------+------------+----------------------+
| wakeUp | WAKE_TIME | read/write | False |
+-------------------------------+-----------+------------+----------------------+
========================
.. image:: https://travis-ci.org/fredericklussier/Lifepo4weredPyController.svg?branch=master
:target: https://travis-ci.org/fredericklussier/Lifepo4weredPyController
.. image:: https://coveralls.io/repos/github/fredericklussier/Lifepo4weredPyController/badge.svg?branch=master
:target: https://coveralls.io/github/fredericklussier/Lifepo4weredPyController?branch=master
.. image:: https://api.codeclimate.com/v1/badges/809cf25fc925a3ed8ef2/maintainability
:target: https://codeclimate.com/github/fredericklussier/Lifepo4weredPyController/maintainability
:alt: Maintainability
.. image:: https://badge.fury.io/py/lifepo4weredPyController.svg
:target: https://badge.fury.io/py/lifepo4weredPyController
Our intention is to design an oriented object access to the lifepo4wered-pi3 data module during runtime application.
reference: http://lifepo4wered.com/lifepo4wered-pi3.html
Using the Raspbery Pi zero in many projects, I found this product
very usefull. So to help my child and python colleagues, we design this.
You can find here the documentation of the lifepo4wered product:
http://lifepo4wered.com/files/LiFePO4wered-Pi3-Product-Brief.pdf.
Status
------
In development
Installation
------------
If you want to use this wrapper, you need:
Not yet, but we will have one, soon.
To dowload and install the LiFePO4wered-Pi drivers and CLI applications,
please read https://github.com/xorbit/LiFePO4wered-Pi.
Features (working on)
---------------------
* Oriented object definition
* Observable elements, so subscribed observers will know when data change
* Periodically read data,
* Python 3.5 and 3.6
* Hardly tested
Detail:
^^^^^^
classes
"""""""
The idea is to use oriented object mechanism to control the LiFePO4wered-Pi variables.
We have distributated LiFePO4wered-Pi variables in different classes:
* Battery (VBAT)
* Led (LED_STATE)
* Touch (TOUCH_STATE)
* WakeTimer (WAKE_TIME)
* USBPowerSource (VIN)
**What about others variables?**
Well! must of them, we just not there yet.
But we think that some of variables are factoring issue (not to use in a runtime environment)
and the provided CLI works perfectly for them.
Like:
* I2C_REG_VER
* I2C_ADDRESS
* DCO_RSEL
* DCO_DCOMOD
* CFG_WRITE
basic usage
*****************
.. code-block:: python
import time
import lifepo4weredPyController
@lifepo4weredPyController.battery.observeElement("rate")
def printRate(previous, actual):
print("previously:{0}, now:{1}".format(previous, actual))
try:
print(lifepo4weredPyController.battery.voltage)
# keep main process alive, so observers will receive changes
while True:
time.sleep(0.1)
except KeyboardInterrupt:
myLifepo4wered.ceaseReading()
print('stopped!')
lifepo4weredPyController.wakeUp = 60 # boot in 1 hour after shutdown
Legendary
*********
* **properies:** name of class property
* **aka:** name used by the LiFePO4wered-Pi variables
* **access:** provide the access of the data of the variable. read means it reads the data from LiFePO4wered and write means it writes value to LiFePO4wered.
* **Periodicaly read:** at interval, this data is read so observers will be notified of any changes
* **na:** not applicable
+-------------------------------------------------------------------------------+
| **Battery** |
+-------------------------------+-----------+------------+----------------------+
| **properies** | **aka** | **access** | **Periodicaly read** |
+===============================+===========+============+======================+
| voltage | VBAT | read only | True |
+-------------------------------+-----------+------------+----------------------+
| rate' | na | read only | True |
+-------------------------------+-----------+------------+----------------------+
'rate: Will give the battery pourcentage
+-------------------------------------------------------------------------------+
| **USBPowerSource** |
+===============================+===========+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-----------+------------+----------------------+
| voltage | VIN | read only | True |
+-------------------------------+-----------+------------+----------------------+
| pluggedIn' | na | read only | True |
+-------------------------------+-----------+------------+----------------------+
'pluggedIn: Will mention is the usb connector is plug to a power source
+-------------------------------------------------------------------------------+
| **Led** |
+-------------------------------+-----------+------------+----------------------+
| **properies** | **aka** | **access** | **Periodicaly read** |
+===============================+===========+============+======================+
| state | LED_STATE | read/write | True |
+-------------+-----------------+-----------+------------+----------------------+
| **methods** | |
+-------------+-----------------------------------------------------------------+
| on | set on the led |
+-------------+-----------------------------------------------------------------+
| off | set off the led |
+-------------+-----------------------------------------------------------------+
| pulse | led pulsing |
+-------------+-----------------------------------------------------------------+
| flash | led flashing |
+-------------+-----------------------------------------------------------------+
+---------------------------------------------------------------------------------+
| **Touch** |
+===============================+=============+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-------------+------------+----------------------+
| state | TOUCH_STATE | read only | true |
+-------------------------------+-------------+------------+----------------------+
+-------------------------------------------------------------------------------+
| **WakeTimer** |
+===============================+===========+============+======================+
| **properies** | **aka** | **access** | **Periodicaly read** |
+-------------------------------+-----------+------------+----------------------+
| wakeUp | WAKE_TIME | read/write | False |
+-------------------------------+-----------+------------+----------------------+
Project details
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 lifepo4weredPyController-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 049655d912d314900015e3c41f65bb3388661a72f6f0b3a0ed1c29ae3f702d09 |
|
MD5 | bef3ec78ba3bbd5cdcc1caeebf81142c |
|
BLAKE2b-256 | e1457fa919f390451e2ced2ad4dbd7cd37c035324c70181749460843d6c9bcec |
Close
Hashes for lifepo4weredPyController-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 431fb63bd5b8c3da0069133d709a1e08b1e5ab11664efd43387a491677227cdf |
|
MD5 | be40e7191c91dd705e0e17ae792c8172 |
|
BLAKE2b-256 | 68ba7e4cf07b0a561faa9b720d9cfa9b93ddc6fb2e5d7cc33fa85f9180b40eb9 |