Giter Site home page Giter Site logo

Comments (2)

JLH-94 avatar JLH-94 commented on June 18, 2024

Hello,
i am trying to use your SCL3300 library with the "new" PortentaH7 from Arduino. Unfortunately I get a longer error message when compiling. It seems to be about the CRC calculation. Maybe you could have a look at it, before i try to reprogram a complete new library.

I postet a request in the PortentaH7-Forum:
https://forum.arduino.cc/index.php?topic=698825.0

Thanks for your effort with that lib. in any case.

from scl3300.

DavidArmstrong avatar DavidArmstrong commented on June 18, 2024

After going through the library and updating how error checking is done and handled, I came to the realization that to 'do the right thing', I have to introduce an incompatibility, however small. I really wanted to avoid this, but handling error conditions is an important enough reason to make a change of this nature.

This change will force the revision number to go to 3.0.0.

The actual code changes are relatively minor, and the change needed to previous sketches is minor too. It can be limited to one changed line in the sketch.

Here is an example...
Version 2.1.4 would have:
if (inclinometer.available()) {
//Do stuff here
}

And for Version 3.0.0, this becomes:
if (inclinometer.available()) {
//Do stuff here
} else inclinometer.reset();

All that is needed is the extra 'else' clause at the end of the 'if' structure when used with the 'available()' function. This will do a software reset of the SCL3300 sensor should an error condition be detected. However, if old sketches are not updated, and the reset isn't done when the SCL3300 enters an error state, then the sensor will stay in that error state, and available() will never return a 'true' value again. (At least, until a power cycle is done, or until reset()/begin() calls are made.)

from scl3300.

Related Issues (20)

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.