Comments (8)
are you deleting the object? allocated memory is freed there
https://github.com/adafruit/Adafruit_ICM20X/blob/master/Adafruit_ICM20X.cpp#L54
from adafruit_icm20x.
see:
adafruit/Adafruit_MS8607#4 (comment)
from adafruit_icm20x.
@caternuson & @ladyada thanks for your help on that for the MS8607. Unfortunately, for the icm20948 does not appear to currently have an init() function for re-initializing the sensors. There is reset(); but calling begin() after reset; is still taking up the free memory.
from adafruit_icm20x.
calling begin() after reset; is still taking up the free memory.
Call begin
only once, in setup
. Call reset
in the loop.
Nothing in reset
should be eating memory:
Adafruit_ICM20X/Adafruit_ICM20X.cpp
Lines 150 to 166 in 6ec93fe
from adafruit_icm20x.
calling begin() after reset; is still taking up the free memory.
Call
begin
only once, insetup
. Callreset
in the loop.Nothing in
reset
should be eating memory:Adafruit_ICM20X/Adafruit_ICM20X.cpp
Lines 150 to 166 in 6ec93fe
Thanks for the quick reply @caternuson. Unfortunately, when I call reset() in the loop without begin(), the the data output of the sensors is only zeroes. Again, as with the other sensor, I am turning this sensor on and off each time to economize battery life.
from adafruit_icm20x.
I tried both the reset embedded with icm20x.h and the reset in icm20948.h. The first causes the device to hang. The latter causes the sensors to output zeroes.
from adafruit_icm20x.
The code in _init
is likely needed to be called also, to re-establish the basic sensor config. But that's private, so not accessible in user sketch. It's also where the unchecked allocations are occurring:
Adafruit_ICM20X/Adafruit_ICM20X.cpp
Lines 207 to 210 in 6ec93fe
So seems like like maybe this is not possible with the current state of the library.
from adafruit_icm20x.
Thanks for identifying this @caternuson. I'll monitor this space for updates to the library, as having this all in sensor is great.
But I will need to adjust my hardware for now to multiple sensors to capture the same data and be compliant with my battery saving measures.
from adafruit_icm20x.
Related Issues (8)
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 adafruit_icm20x.