Comments (2)
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.
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)
- Operator error HOT 6
- Workaround needed for PortentaH7 design flaws HOT 1
- SPI VSPI setting CS Issue HOT 2
- Bitwise leftshift will show a warning on some MCU systems
- SPI Issues HOT 6
- Duplicates HOT 8
- Assistance debugging? HOT 2
- Compatability HOT 8
- Can I use this library for two SCL3300 sensors connected to the same Arduino board? HOT 3
- Library speed HOT 16
- Using the SCL3300 with ESP32 HOT 10
- Need functions for Calculated Tilt Offset from Level values HOT 1
- Accuracy in Mode 4 HOT 3
- reset() function HOT 5
- Slow response from sensor, excessive reset calls and error flagging HOT 1
- Acceleration Readings HOT 1
- Connection issues - crcerr HOT 6
- SCL3300 Serial Number is not reported correctly HOT 1
- Reading accelerometer values HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scl3300.