Giter Site home page Giter Site logo

pytardo's Introduction

Pytardo

Arduino setup

The Arduino board should be set up so that it prints out a line containing comma-separated readings whenever something gets written to the serial port. An output example would be:

T1 = 20, T2 = 32, c = 0.1

Architecture

  • The Poller class continously polls arduino to get the readings.
  • Readings are logged through the log() method of loggers objects that are added to the Poller through the Poller.add_logger() method.
  • Readings are checked against user-defined conditions by the Monitor class. Monitor objects can be added to the Poller through the Poller.add_monitor() method.
  • Monitor objects prepare a list of readings that meet one or more conditions (and hence might raise warnings) and pass it to callbacks objects, together with all the current readings, through their react() method. Note that react() is always called, even when there are no warnings. In this way callbacks objects can update their internal status after each reading (useful, for instance, to keep track of values oscillating around a threshold).
  • Conditions are parsed and managed by ad-hoc objects that have a is_met method (see conditions.py).

Configuration

pytardo.py or pytardod.py expect a single argument that specifies the path of the file that contains the configuration. Example configuration files can be found in the examples/ folder.

Dependencies

  • pySerial
  • python-daemon
  • MySQL-python

Acknowledgements

  • The dummyserial.py package is heavily based on dummyserial

pytardo's People

Contributors

lorenzo-rovigatti avatar

Watchers

 avatar James Cloos 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.