Comments (7)
Please post complete code being used to read the data. The rate limit in date reading may be due to something else in code.
from adafruit_mlx90393_library.
`#include "Adafruit_MLX90393.h"
Adafruit_MLX90393 sensor = Adafruit_MLX90393();
#define MLX90393_CS 10
void setup(void)
{
Serial.begin(115200);
/* Wait for serial on USB platforms. */
while (!Serial) {
delay(10);
}
Serial.println("Starting Adafruit MLX90393 Demo");
//if (! sensor.begin_I2C()) { // hardware I2C mode, can pass in address & alt Wire
if (! sensor.begin_SPI(MLX90393_CS)) { // hardware SPI mode
Serial.println("No sensor found ... check your wiring?");
while (1) { delay(5); }
}
Serial.println("Found a MLX90393 sensor");
sensor.setGain(MLX90393_GAIN_2_5X);
// You can check the gain too
Serial.print("Gain set to: ");
switch (sensor.getGain()) {
case MLX90393_GAIN_1X: Serial.println("1 x"); break;
case MLX90393_GAIN_1_33X: Serial.println("1.33 x"); break;
case MLX90393_GAIN_1_67X: Serial.println("1.67 x"); break;
case MLX90393_GAIN_2X: Serial.println("2 x"); break;
case MLX90393_GAIN_2_5X: Serial.println("2.5 x"); break;
case MLX90393_GAIN_3X: Serial.println("3 x"); break;
case MLX90393_GAIN_4X: Serial.println("4 x"); break;
case MLX90393_GAIN_5X: Serial.println("5 x"); break;
}
// Set resolution, per axis
sensor.setResolution(MLX90393_X, MLX90393_RES_19);
sensor.setResolution(MLX90393_Y, MLX90393_RES_19);
sensor.setResolution(MLX90393_Z, MLX90393_RES_16);
// Set oversampling
sensor.setOversampling(MLX90393_OSR_2);
// Set digital filtering
sensor.setFilter(MLX90393_FILTER_6);
}
void loop(void) {
float x, y, z;
// get X Y and Z data at once
if (sensor.readData(&x, &y, &z)) {
Serial.print("X: "); Serial.print(x, 4); Serial.println(" uT");
Serial.print("Y: "); Serial.print(y, 4); Serial.println(" uT");
Serial.print("Z: "); Serial.print(z, 4); Serial.println(" uT");
} else {
Serial.println("Unable to read XYZ data from the sensor.");
}
delay(2);
}`
from adafruit_mlx90393_library.
The code currently read all 3 axis.
from adafruit_mlx90393_library.
How are you determining the read rate? Having serial output in the read loop will slow things down.
from adafruit_mlx90393_library.
I just count number of samples return per second in the Serial print. It should increase regardless.
True, serial output will slow the sampling rate but I want to check if measuring one axis or increasing frequency will return more samples. Theoretically it should.
from adafruit_mlx90393_library.
The 2ms delay will also limit the reading to roughly 500Hz. Well below any O(MHz) rate being attempted.
The MLX90393 output data rate (ODR) is not set directly. Instead, there is OSR (oversampling) and DIG_FILT (filtering). The resulting maximum ODR is a fallout of those settings. See Tables 18 and 19 in the datasheet.
Getting a rate in the MHz range is not even possible.
from adafruit_mlx90393_library.
Related Issues (13)
- Default CONF3 setting is not usable? HOT 1
- Need to be able to read data without being in single measurement mode HOT 6
- Version 2.0.0 in Platform IO does not contain the changes made to the library in GitHub HOT 6
- MLX90393 resolution HOT 5
- Should this say DIG instead of DIF? HOT 2
- Reason for 10ms delay in startSingleMeasurement() HOT 2
- Wake-Up on Change mode HOT 1
- Issues about the code in basicdemo HOT 7
- Add resolution, filter, and oversampling HOT 3
- Update sensitivty table? HOT 5
- Convert to BusIO usage. HOT 2
- Incorrect gain coefficients HOT 6
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_mlx90393_library.