Git Product home page Git Product logo

greenponik / greenponik_atlas_scientific_oem_i2c Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 660 KB

Read Atlas Scientific OEM circuits on I2c bus

Home Page: https://greenponik.github.io/GreenPonik_Atlas_Scientific_OEM_i2c/

License: MIT License

Python 96.16% Makefile 1.74% Batchfile 2.10%
raspberry-pi ec ph grow i2c-device atlas-scientific-circuits electro-conductivity hydroponics i2c-sensors gardening

greenponik_atlas_scientific_oem_i2c's Introduction

Quality Gate Status Maintainability Rating

Lines of Code Duplicated Lines (%)

Reliability Rating Security Rating Vulnerabilities

Upload Python Package

GreenPonik_Atlas_Scientific_OEM_i2c.py Library for Raspberry pi

A python3 class to use Atlas Scientific OEM circuits on i2c bus.

! Only tested on Raspberry Pi 3 A+ !

Table of Contents

Installation

> git clone https://github.com/GreenPonik/GreenPonik_Atlas_Scientific_OEM_i2c.git
cd GreenPonik_Atlas_Scientific_OEM_i2c
pip3 install -r requirements.txt

or

> pip3 install greenponik-atlas-scientific-oem-i2c
from GreenPonik_Altas_Scientific_i2c.ECI2c import ECI2c
from GreenPonik_Altas_Scientific_i2c.PHI2c import PHI2c

Examples

Read EC

works with EC circuit https://www.atlas-scientific.com/circuits/conductivity-oem-circuit/

from GreenPonik_Altas_Scientific_OEM_i2c.ECI2c import ECI2c

if __name__ == "__main__":
    try:
        print("get device infos")
        ec_i2c = ECI2c(
            bus=1,
            addr=ECI2c.ADDR_OEM_TXT_TO_HEXA['EC'],
            moduletype="EC",
        )
        print(ec_i2c.get_device_info())
        # put here the current temperature
        print(ec_i2c.set_temperature(25.00))
        ec = ec_i2c.get_read()
        print("current ec is %.2f" % ec)
    except Exception as e:
        print("Exception occured", e)

go to ec example

Read pH

works with pH circuit https://www.atlas-scientific.com/circuits/ph-oem-circuit/

from GreenPonik_Altas_Scientific_OEM_i2c.PHI2c import PHI2c

if __name__ == "__main__":
    try:
        print("get device infos")
        ph_i2c = PHI2c(
            bus=1,
            address=PHI2c.ADDR_OEM_TXT_TO_HEXA['PH'],
            moduletype="PH",
        )
        print(ph_i2c.get_device_info())
        print(ph_i2c.get_read())
    except Exception as e:
        print("Exception occured", e)

go to ph example

todo list

  • add calibration workflow in examples
  • add compatibility with all circuits (OD / ORP / CO2 / PRESSURE / FLOW)

Credits

Write by Mickael Lehoux, from GreenPonik, 2020

greenponik_atlas_scientific_oem_i2c's People

Contributors

mklhx avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.