Code Monkey home page Code Monkey logo

digital-multimeter's People

Contributors

gergelyk avatar m-bab avatar ndejong avatar themrposeidon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

digital-multimeter's Issues

Python example

Excellent software using cli but could you add a very simple Python example showing how to take single or multiple readings. I am trying to follow the limited python documentation but I am missing something...

Need to clear old data from usb / serial

Hi,
I am using the dmm to read data on a "once per cycle" basis in a python loop. I can see the multimeter screen has changed significantly but the data read from the usb is hardly changed. I realise that there is a pipeline of data being read and I am only seeing the next entry in the list ( around 0.5 s after the initial reading) when it should be a reading from ~10s later. I can clear the list by using dmm(connect=None) followed by dmm(connect=/usb0, model...) but this stops program execution and does not always reconnect. Is there a simple way to make only one reading and then clear the rest of the entries?

BTW I am using a BTMETER BT-90EPC which works fine when model UniTrend_UT60E is used

connect option for using ser2net / socat?

been trying out various types of solution.

client <->wifi/telnet<->ser2net(192.168.1.238:23)<->serial device

Client side.(windows os)
create temporary virtual com port(COM8) and point to 192.168.1.238:23 using software HW Virtual Serial Port
start cmd...
dmm read --connect COM8 --count 0
it works perfect...

Client side. (debian)

pi@raspberry:/dev $ sudo socat pty,link=/dev/ttyNET0,waitslave tcp:192.168.1.238:23
pi@raspberry:/dev $ sudo chmod 666 /dev/ttyNET0
pi@raspberry:/dev $ dmm read --connect /dev/ttyNET0 --count 0

gets error:

/home/pi/.local/lib/python3.9/site-packages/future/standard_library/__init__.py:65: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Traceback (most recent call last):
  File "/home/pi/.local/bin/dmm", line 8, in <module>
    sys.exit(dmm())
  File "/home/pi/.local/lib/python3.9/site-packages/digital_multimeter/cli/entrypoints.py", line 12, in dmm
    click.dmm()
  File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/digital_multimeter/cli/click.py", line 80, in get_reading
    cli_output(api.get_reading(), format=format, output=output, count=counted)
  File "/home/pi/.local/lib/python3.9/site-packages/digital_multimeter/DigitalMultimeter.py", line 38, in get_reading
    self.__load_multimeter()
  File "/home/pi/.local/lib/python3.9/site-packages/digital_multimeter/DigitalMultimeter.py", line 47, in __load_multimeter
    module = __import__("digital_multimeter.multimeters.{}".format(class_name), fromlist=["digital_multimeter"])
  File "/home/pi/.local/lib/python3.9/site-packages/digital_multimeter/multimeters/MultimeterFortuneFS9721.py", line 5, in <module>
    from serial import SerialException

sudo picocom -b 2400 /dev/ttyNET0
and i can see i get something unreadable...

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.