ADXL345 - How is data output given sampling rate?

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
AlanWx
 
Posts: 11
Joined: Tue May 23, 2023 8:49 pm

ADXL345 - How is data output given sampling rate?

Post by AlanWx »

I am in the process of learning how to use the Adafruit ADXL345. My question is: If the accelerometer is sampling at 100 hz and the void (loop) is printing a value every 1000ms, then what is being output for the accelerations along the three axes? Is it: 1. an average of 100 readings of the x: y: and z: accelerations? 2. just the x: y: and z: accelerations pooint just before / at the time the reading is written to the monitor? or 3. some other value that depends upon both the sampling rate and the rate at which the output is written to the monitor?

It seems like many of these little accelerometers are capable to sampling data (much more data) than the Arduino's are able to store/manipulate. So, I was curious about just what I was getting by way of output given the sampling setting and the output.

User avatar
adafruit_support_bill
 
Posts: 88421
Joined: Sat Feb 07, 2009 10:11 am

Re: ADXL345 - How is data output given sampling rate?

Post by adafruit_support_bill »

The sample rate of the device is asynchronous to the polling rate in your code. What you code prints will be the most recent sample at the time of the poll.

User avatar
AlanWx
 
Posts: 11
Joined: Tue May 23, 2023 8:49 pm

Re: ADXL345 - How is data output given sampling rate?

Post by AlanWx »

Thanks, Bill. That confirms what I was thinking.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Wearables”