Giter Site home page Giter Site logo

ens160_driver's People

Contributors

chrfriese123 avatar nordicp avatar patryk02 avatar webseitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ens160_driver's Issues

ENS160:: requires instantiator that uses predefined Wire() connection

When using the device in a system that has I2C wire previously defined; then an instantiator [ begin() ] that uses that existing definition instead of trying to define its own wire port.

The use case: I have 'SmartCitizen' SAMD21G system that has two I2C channels defined; one of which has I2C Mux (TCA9458A) connected; and the ENS160 + ENS210 are connected to one channel.
The operation mode calls for switching one the appropriate Mux Channel before communicating with the ENS devices.
It is simply unnecessary for the ENS160 library to carry on making its own wire definition. I do not want to have to support that.
Its not the business of the library that supports VOC measurement to manage I2C.

Therefore my request is to add support for the predefined Wire such as begin( uint8_t deviceAddress, TwoWire *Wire).

I will add such function to my copy of the library; but would like you to add it to the master.

why offset measured values?

in the example code ens160_dev_shield.ino, why is there an offset of 500 for the tVOC readings and 400 for the eCO2?

if (new_TVOC < 500) new_TVOC = 0; 
  else if (new_TVOC > 5000) new_TVOC = 5000;
  else new_TVOC = new_TVOC - 500;

  new_eCO2 = (uint16_t)ens160.geteCO2();
  if (new_eCO2 < 400) new_eCO2 = 400;
  else if (new_eCO2 > 5000) new_eCO2 = 5000;

Sensor Outputs 0 in OPMODE"Normal operation"

I'm using a micropython library, the ens160 outputs good data when first powered up but after the initial start-up the when the VALIDITY FLAG goes to 0, which meas normal operation it just outputs 0 for all data.

Driver didn't work with latest changes

I downloaded the library files to work with a ScioSense devkit, containing ENS160+ENS210.
The lib had a bunch of compile errors, so I reversed some of the recent changed to the ScioSense_ENS160.cpp file, and now it works:


149  - result = this->write8(_slaveaddr, ENS160_REG_COMMAND, ENS160_COMMAND_GETVER);
149 + result = this->write8(_slaveaddr, ENS160_REG_COMMAND, ENS160_COMMAND_GET_APPVER);

251  - bool ScioSense_ENS160::measure()
251 + bool ScioSense_ENS160::measure(bool waitForNew) 

275  - this->read(_slaveaddr, ENS160_REG_DATA_IAQ, i2cbuf, 7);
275 + this->read(_slaveaddr, ENS160_REG_DATA_AQI, i2cbuf, 7);

I do not wish to commit this code, because I'm new to the code, so I not confident that I havn't fucked something up somewhere else... But like this, the library works for me.

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.