ESP 32 ADXL345 I2c vibrations measurments

hello i am using two adxl345 te read data


the problem is they see different freuqency
iam using basci adafruit library to just read data and send via serial port

//sensors_event_t event1, event2;
//adxl1.getEvent(&event1);
//Serial.print(event1.acceleration.x); Serial.print(", ");
//Serial.print(event1.acceleration.y); Serial.print(", ");
//Serial.print(event1.acceleration.z); Serial.print(", ");

//Collect_data();
//Send_save_data(); //send data to the server

//adxl2.getEvent(&event2);
//Serial.print(event2.acceleration.x); Serial.print(", ");
//Serial.print(event2.acceleration.y); Serial.print(", ");
//Serial.print(event2.acceleration.z); Serial.print(", ");

//Serial.println(currentTime);

The problem is that there is any code to analyze.

OK, if you swap the sensors what do you get?

yes the problem is with the same sensor, i was changing them

unclear what this means.

what is so hard to write down a little bit more text that explitly names all details?

sensor 1 placed at place A
sensor 2 placed at place B
different frequencies

sensor 1 placed at place B
sensor 2 placed at place A
what frequencies?

still they are diffrent freaquencies
sensor1 at place a shows lower freq
and at place b shows lower freq but if i changed adress by setting SDO 0/1 the sensor which is showing lower freq is changeing

How do you expect the forum to help you?
You haven't shown us any code.

Still you have not followed the forum rules, so no one can help you.

Please read and follow the instructions in the "How to get the best out of this forum" post.

#include <Arduino.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>

// Inicjalizacja dwóch ADXL345
Adafruit_ADXL345_Unified adxl1 = Adafruit_ADXL345_Unified(0x53); // Pierwszy ADXL345
Adafruit_ADXL345_Unified adxl2 = Adafruit_ADXL345_Unified(0x1D); // Drugi ADXL345

void setup() {
  Serial.begin(115200);
  Serial.println("PC Serial connection established");

  // Inicjalizacja pierwszego czujnika
  if (!adxl1.begin()) {
    Serial.println("Nie znaleziono pierwszego ADXL345. Sprawdź połączenia.");
    while (1);
  }
  adxl1.setRange(ADXL345_RANGE_4_G);
  Serial.println("Pierwszy ADXL345 skonfigurowany!");

  // Inicjalizacja drugiego czujnika
  if (!adxl2.begin()) {
    Serial.println("Nie znaleziono drugiego ADXL345. Sprawdź połączenia.");
    while (1);
  }
  adxl2.setRange(ADXL345_RANGE_4_G);
  Serial.println("Drugi ADXL345 skonfigurowany!");
}

void loop() {
  // Odczyt danych z pierwszego czujnika
  sensors_event_t event1;
  adxl1.getEvent(&event1);

  // Odczyt danych z drugiego czujnika
  sensors_event_t event2;
  adxl2.getEvent(&event2);

  // Wyświetlanie wyników
  Serial.print("Czujnik 1 -> X: ");
  Serial.print(event1.acceleration.x); Serial.print(" m/s^2, Y: ");
  Serial.print(event1.acceleration.y); Serial.print(" m/s^2, Z: ");
  Serial.print(event1.acceleration.z); Serial.println(" m/s^2");

  Serial.print("Czujnik 2 -> X: ");
  Serial.print(event2.acceleration.x); Serial.print(" m/s^2, Y: ");
  Serial.print(event2.acceleration.y); Serial.print(" m/s^2, Z: ");
  Serial.print(event2.acceleration.z); Serial.println(" m/s^2");

  
}

Okay
So i am trying to measure signal which is sin generated to loudspeaker diaphragm
(to be honest i dont know how to name this) i placed my sensor on this :stuck_out_tongue:
the main problem is that as you can see both sensors see diffrent freq
i was thinking its something with freq of the sensor
i tried to set
'setBaudrate(3200)' but with the high freaquency the probes are just noises
i am sending the probes with RS232 to Terraterm

Do the experiment with just one sensor in two steps, placed first in location A, then placed in location B.

You are wasting a lot of time printing unnecessary information like

Serial.print(" m/s^2, Y: ");

It is much faster to print in .csv file format. You already know what the data points mean.

  Serial.print(event1.acceleration.x); Serial.print(',');
  Serial.print(event1.acceleration.y); Serial.print(',');
  Serial.println(event1.acceleration.z);