Coder Social home page Coder Social logo

fargiolas / py-opc-ng Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 2.87 MB

A python module to drive new generation Alphasense Optical Particle Counters. Supports OPC N3, N2, R1 and R2

License: GNU Lesser General Public License v3.0

Python 100.00%
air-quality alphasense opc-n2 particulates-sensors opc-n3 opc-r1 opc-r2

py-opc-ng's People

Contributors

fargiolas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

py-opc-ng's Issues

Unexpected Response Error

I have a OPC-N3 connected to Raspberry PI via USB to SPI cabling. I have three of these setups and can successfully connect to the OPC and read data 50% of the time.

Upon reboot or at random sampling windows i receive the following error:

ERROR:opcng:Error while reading bytes from the device: Received unexpected response 0x3F for command: 0x3F 

Traceback (most recent call last): 

File "test_opc.py", line 10, in  

dev = opc.detect(spi) 

File "/usr/local/lib/python3.7/dist-packages/opcng/init.py", line 680, in detect 

info = o.info() 

File "/usr/local/lib/python3.7/dist-packages/opcng/init.py", line 381, in info 

buf = self._read_bytes(_OPC_CMD_READ_INFO_STRING, 60) 

File "/usr/local/lib/python3.7/dist-packages/opcng/init.py", line 302, in _read_bytes 

logger.error('Something failed while reading byte sequence, expected size: {}, received: {}'.format(sz, len(l))) 

NameError: name 'l' is not defined

Any suggestions as to what may be causing this issue?

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.