Code Monkey home page Code Monkey logo

fs2012_flow_sensor's Introduction

FS2012 flow sensor

Firmware, Python library, PyQt GUI for working with the FS2012 flow sensors. Supports only Python 3. For a Python 2-compatible version of the software, see the original repo.

Requirements

Installation

Navigate to the directory that houses setup.py and install in editable mode:

cd fs2012_flow_sensor/software/fs2012_flow_sensor
pip install -e .

DataReader Example

The below code snippet can be found in examples/data_reader_example.py:

import time
from fs2012_flow_sensor import DataReader

port = '/dev/ttyUSB0'
reader = DataReader(port)
reader.start()
for i in range(75):
    print(reader.get_data())
    time.sleep(0.1)
reader.stop()

Running the pyqt GUI

The script runs from anywhere, and outputs flow_data.txt in the current directory, if the "record" box is checked. Run with:

flow_sensor_app

The script can accept an argument that specifies the path to the uC port. This argument is defaulted to /dev/ttyUSB0. If the above command fails, check that /dev/ttyUSB0 is the correct port. If not, specify it like so:

flow_sensor_app /dev/<my_port>

app_demo

Running the live plot

The script runs from anywhere, and outputs flow_data.csv in the current directory. Run with:

flow_sensor_live_plot

The script can accept an argument that specifies the path to the uC port. This argument is defaulted to /dev/ttyUSB0. If the above command fails, check that /dev/ttyUSB0 is the correct port. If not, specify it like so:

flow_sensor_live_plot /dev/<my_port>

live_plot_demo

fs2012_flow_sensor's People

Contributors

hanhanhan-kim avatar willdickson avatar f-ponce avatar

Watchers

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