Vibration Calculation with ADXL345

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
onerainywish
 
Posts: 15
Joined: Thu Oct 07, 2021 10:25 pm

Vibration Calculation with ADXL345

Post by onerainywish »

Hello! Love the ADXL345 and I am trying to use the CircuitPython libraries to calculate vibration: https://github.com/adafruit/Adafruit_Ci ... n/examples

Running into some challenges, as I'm trying to calculate Hz, but don't see any examples of how to do this using CircuitPython library in Python. Can you please point me in the direction of some code samples that convert those x,y,z values sampled from the ADXL345 into Hz to show and measure vibration? Thanks!

User avatar
sj_remington
 
Posts: 1021
Joined: Mon Jul 27, 2020 4:51 pm

Re: Vibration Calculation with ADXL345

Post by sj_remington »

To convert a series of values measured over time into frequencies usually requires either a Fourier transform or autocorrelation calculation. If you can't find examples for CircuitPython, there are several in C/C++ for Arduino.

Here is an overview https://www.twi-global.com/technical-kn ... n-analysis

Edit: I see that forum members have already explained this to you. Consider rereading the posts in that thread: viewtopic.php?f=19&t=183954

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”