MPU6050 accelerometer data not changing using EspNow

I am trying to write/edit a code to send my MPU6050 accelerometer data from Esp32 to Esp8266 using EspNow protocol.
At the sender end, the accelerometer data was not changing, was incorrect and not sending to the receiver.
At the receiver end, I can't see the accelerometer data at all.

I have attached the codes and the serial monitor output.

sender

#include <esp_now.h>
#include <WiFi.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_MPU6050.h>
#include <SPI.h>

// Check I2C device address and correct line below (0x68)
//                                   id, address
Adafruit_MPU6050 mpu;

#define CHANNEL 1

// REPLACE WITH THE RECEIVER'S MAC Address
uint8_t broadcastAddress[] = {0x13, 0x93, 0xC5, 0xB6, 0x69, 0x92};

// Structure example to send data
// Must match the receiver structure
typedef struct struct_message
{
    int id; // must be unique for each sender board
    float acc_x;
    float acc_y;
    float acc_z;
    

} struct_message;

// Create a struct_message called myData
struct_message myData;

// Create peer interface
esp_now_peer_info_t peerInfo;

// callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status)
{
    Serial.print("\r\nLast Packet Send Status:\t");
    Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");
}

void setup()
{
    // Init Serial Monitor
    Serial.begin(2000000);

    /* Initialise the sensor */
     if (!mpu.begin()) {
    Serial.println("Failed to find MPU6050 chip");
    while (1); 
            
    }

    

    // Set device as a Wi-Fi Station
    WiFi.mode(WIFI_STA);

    // Init ESP-NOW
    if (esp_now_init() != ESP_OK)
    {
        Serial.println("Error initializing ESP-NOW");
        return;
    }

    // Once ESPNow is successfully Init, we will register for Send CB to
    // get the status of Trasnmitted packet
    esp_now_register_send_cb(OnDataSent);

    // Register peer
    memcpy(peerInfo.peer_addr, broadcastAddress, 6);
    peerInfo.channel = 0;
    peerInfo.encrypt = false;

    // Add peer
    if (esp_now_add_peer(&peerInfo) != ESP_OK)
    {
        Serial.println("Failed to add peer");
        return;
    }
}

void loop()
{
    sensors_event_t accelerometerData;
    sensors_event_t a, g, temp;
    mpu.getEvent(&a, &g, &temp);
   
    readAccValues(&accelerometerData);

    // Set values to send
    myData.id = 1;

    Serial.print("acc X:");
    Serial.println(myData.acc_x);

    Serial.print("acc Y:");
    Serial.println(myData.acc_y);

    Serial.print("acc Z:");
    Serial.println(myData.acc_z);

    

    // Send message via ESP-NOW
    esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *)&myData, sizeof(myData));

    if (result == ESP_OK)
    {
        Serial.println("Sent with success");
    }
    else
    {
        Serial.println("Error sending the data");
    }
    delay(10000);
}



void readAccValues(sensors_event_t *event)
{
    // read acceleration event
    myData.acc_x = event->acceleration.x;
    myData.acc_y = event->acceleration.y;
    myData.acc_z = event->acceleration.z;
}

sender monitor

Last Packet Send Status:	Delivery Success
acc X:1.96
acc Y:0.75
acc Z:0.00
Sent with success

Last Packet Send Status:	Delivery Success
acc X:1.96
acc Y:0.75
acc Z:0.00
Sent with success

Last Packet Send Status:	Delivery Success
acc X:1.96
acc Y:0.75
acc Z:0.00
Sent with success

Last Packet Send Status:	Delivery Success
acc X:1.96
acc Y:0.75
acc Z:0.00
Sent with success

Last Packet Send Status:	Delivery Success

receiver code below

#include <espnow.h>
#include <ESP8266WiFi.h>

#define CHANNEL 1

// Structure example to receive data
// Must match the sender structure
typedef struct struct_message {
  int id;
    float acc_x;
    float acc_y;
    float acc_z;
    
}struct_message;

// Create a struct_message called myData
struct_message myData;

// Create a structure to hold the readings from each board
struct_message rightGlove;
struct_message leftGlove;

// Create an array with all the structures
struct_message boardsStruct[3] = {rightGlove, leftGlove};

// callback function that will be executed when data is received
void OnDataRecv(uint8_t * mac_addr, uint8_t *incomingData, uint8_t len) {
  char macStr[18];
  Serial.print("Packet received from: ");
  snprintf(macStr, sizeof(macStr), "%02x:%02x:%02x:%02x:%02x:%02x",
           mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
  Serial.println(macStr);
  memcpy(&myData, incomingData, sizeof(myData));
  Serial.printf("Board ID %u: %u bytes\n", myData.id, len);
  // Update the structures with the new incoming data
  boardsStruct[myData.id-1].acc_x = myData.acc_x;
  boardsStruct[myData.id-1].acc_y = myData.acc_y;
  boardsStruct[myData.id-1].acc_x = myData.acc_z;
 
  /*Serial.print("acc_x: %d \n", boardsStruct[myData.id-1].acc_x);
  Serial.print("acc_y: %d \n", boardsStruct[myData.id-1].acc_y);
  Serial.print("acc_z: %d \n", boardsStruct[myData.id-1].acc_x);*/
  
  Serial.println();
}
 
void setup() {
  //Initialize Serial Monitor
  Serial.begin(2000000);
  
  //Set device as a Wi-Fi Station
  WiFi.mode(WIFI_STA);

  //Init ESP-NOW
  if (esp_now_init() != ERR_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
  }
  
  // Once ESPNow is successfully Init, we will register for recv CB to
  // get recv packer info
  esp_now_register_recv_cb(OnDataRecv);
}
 
void loop() {
   delay(10000);  
}

receiver monitor


Packet received from: c8:c9:a3:cb:73:48
Board ID 1: 16 bytes

Packet received from: c8:c9:a3:cb:73:48
Board ID 1: 16 bytes

Packet received from: c8:c9:a3:cb:73:48
Board ID 1: 16 bytes

Packet received from: c8:c9:a3:cb:73:48
Board ID 1: 16 bytes

Packet received from: c8:c9:a3:cb:73:48
Board ID 1: 16 bytes

I suggest you concentrate on getting the MPU6050 operational
have you run the Adafruit example programs?
e.g. Examples> Adafruit MPU6050>basic readings

if you have problems try running the I2C scanner to check you have connected it correctly

Another place to start is to get EspNow working properly with the examples.

Yes , I have done that. the Adafruit MPU6050 basic reading works fine.

I'm rather surprised that you get any data. You read acceleration, gyrometer and temperature data into a, g and temp but then provide accelerometerData to the readAccValues() routine.

EspNow examples work fine too.

I believe I have missed some lines of code.

I will appreciate inputs

in the method OnDataRecv() your print out the "Packet received from" etc but not the values of
myData.acc_x; etc -the prints are in the code but commented out

 /*Serial.print("acc_x: %d \n", boardsStruct[myData.id-1].acc_x);
  Serial.print("acc_y: %d \n", boardsStruct[myData.id-1].acc_y);
  Serial.print("acc_z: %d \n", boardsStruct[myData.id-1].acc_x);*/

I have uncommented it, unfortunately, can't compile

error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive]
42 | Serial.print("acc_z: %d \n", boardsStruct[myData.id-1].acc_x);
| ^~~~~~~~~~~~~~
| |
| const char*

exit status 1

Compilation error: no matching function for call to 'print(const char [12], float&)'

looks like the print is mixing up some C printf() conversion specificers
try

Serial.print("acc_x:"); Serial.println( boardsStruct[myData.id-1].acc_x);

in the receiver you are overwriting the X value with Z

 boardsStruct[myData.id-1].acc_x = myData.acc_x;
  boardsStruct[myData.id-1].acc_y = myData.acc_y;
  boardsStruct[myData.id-1].acc_x = myData.acc_z;    // ?????

The values are not changing in the sender

acc X:0.00
acc Y:1.96
acc Z:1.97
Sent with success

Last Packet Send Status:	Delivery Success
acc X:0.00
acc Y:1.96
acc Z:1.97
Sent with success

Last Packet Send Status:	Delivery Success
acc X:0.00
acc Y:1.96
acc Z:1.97
Sent with success

Last Packet Send Status:	Delivery Success

did you look at the problems identified by @pylon in post #5 ?

Yes please, I have looked at it.

#include <esp_now.h>
#include <WiFi.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_MPU6050.h>
#include <SPI.h>

// Check I2C device address and correct line below (0x68)
//                                   id, address
Adafruit_MPU6050 mpu;



// REPLACE WITH THE RECEIVER'S MAC Address
uint8_t broadcastAddress[] = {0xc8, 0xc9, 0xa3, 0x6d, 0x96, 0x49};

// Structure example to send data
// Must match the receiver structure
typedef struct struct_message
{
    int id; // must be unique for each sender board
    float acc_x;
    float acc_y;
    float acc_z;
    
} struct_message;

// Create a struct_message called myData
struct_message myData;

// Create peer interface
esp_now_peer_info_t peerInfo;

// callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status)
{
    Serial.print("\r\nLast Packet Send Status:\t");
    Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");
}

void setup(void)
{
    // Init Serial Monitor
    Serial.begin(2000000);
    while (!Serial)
    delay(10); //    

    Serial.println("Adafruit MPU6050 test!");    

    /* Initialise the sensor */
     if (!mpu.begin()) {
    Serial.println("Failed to find MPU6050 chip");
    while (1); {
      delay(10);
    }
      }
           
     
    Serial.println("MPU6050 Found!");

    // Set device as a Wi-Fi Station
    WiFi.mode(WIFI_STA);

    // Init ESP-NOW
    if (esp_now_init() != ESP_OK)
    {
        Serial.println("Error initializing ESP-NOW");
        return;
    }

    // Once ESPNow is successfully Init, we will register for Send CB to
    // get the status of Trasnmitted packet
    esp_now_register_send_cb(OnDataSent);

    // Register peer
    memcpy(peerInfo.peer_addr, broadcastAddress, 6);
    peerInfo.channel = 0;
    peerInfo.encrypt = false;

    // Add peer
    if (esp_now_add_peer(&peerInfo) != ESP_OK)
    {
        Serial.println("Failed to add peer");
        return;
    }
}

void loop()
{
    sensors_event_t a, g, temp;
   
   
    mpu.getEvent(&a, &g, &temp);

    // Set values to send
    myData.id;
        
    
   /* Serial.print("acc X:");
    Serial.println(myData.acc_x);

    Serial.print("acc Y:");
    Serial.println(myData.acc_y);

    Serial.print("acc Z:");
    Serial.println(myData.acc_z);*/

   /*sensors_event_t a, g, temp;
    mpu.getEvent(&a, &g, &temp);*/

    
    Serial.print("Acceleration X: ");
    Serial.print(myData.acc_x);
    Serial.print(", Y: ");
    Serial.print(myData.acc_y);
    Serial.print(", Z: ");
    Serial.print(myData.acc_z);
    Serial.println(" m/s^2");  
    
     Serial.println("");
      delay(500);     

    

    // Send message via ESP-NOW
    esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *)&myData, sizeof(myData));

    if (result == ESP_OK)
    {
        Serial.println("Sent with success");
    }
    else
    {
        Serial.println("Error sending the data");
    }
    delay(10000);
}



void getEvent(sensors_event_t *event)
{
    // read acceleration event
    myData.acc_x = event->acceleration.x;
    myData.acc_y = event->acceleration.y;
    myData.acc_z = event->acceleration.z;
}

Acceleration X: 0.00, Y: 0.00, Z: 0.00 m/s^2

Sent with success

Last Packet Send Status: Delivery Success

Acceleration X: 0.00, Y: 0.00, Z: 0.00 m/s^2

Sent with success

Last Packet Send Status: Delivery Success

Acceleration X: 0.00, Y: 0.00, Z: 0.00 m/s^2

Sent with success

Last Packet Send Status: Delivery Success

Acceleration X: 0.00, Y: 0.00, Z: 0.00 m/s^2

here is an example sending LSM9DS1 9-axis iNEMO inertial module data over ESP-NOW - may give you some ideas
sender

// ESP32 test of ESP-NOW - transmit LSM9DS1 9-axis iNEMO inertial module data
/*
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/esp-now-esp32-arduino-ide/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files.
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
*/

#include <Wire.h>
//#include <SPI.h>
#include "Adafruit_LSM9DS1.h"
//#include <Adafruit_Sensor.h>  // not used in this demo but required!


#include <esp_now.h>
#include <WiFi.h>

// REPLACE WITH YOUR RECEIVER MAC Address
uint8_t broadcastAddress[] = {0x0C,0xB8,0x15,0xEC,0x1F,0xD0};

esp_now_peer_info_t peerInfo;

// callback when data is sent
void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) {
  Serial.print("\r\nLast Packet Send Status:\t");
  Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail");
}

void xprintf(const char *format, ...)
{
  char buffer[256];
  va_list args;
  va_start(args, format);
  vsprintf(buffer, format, args);
  va_end(args);
  Serial.print(buffer);
}

 void setupSensor()
{
  // 1.) Set the accelerometer range
  LSM9DS1_setupAccel(LSM9DS1_ACCELRANGE_2G);
  //LSM9DS1_setupAccel(LSM9DS1_ACCELRANGE_4G);
  //LSM9DS1_setupAccel(LSM9DS1_ACCELRANGE_8G);
  //LSM9DS1_setupAccel(LSM9DS1_ACCELRANGE_16G);

  // 2.) Set the magnetometer sensitivity
  LSM9DS1_setupMag(LSM9DS1_MAGGAIN_4GAUSS);
  //LSM9DS1_setupMag(LSM9DS1_MAGGAIN_8GAUSS);
  //LSM9DS1_setupMag(LSM9DS1_MAGGAIN_12GAUSS);
  //LSM9DS1_setupMag(LSM9DS1_MAGGAIN_16GAUSS);

  // 3.) Setup the gyroscope
  LSM9DS1_setupGyro(LSM9DS1_GYROSCALE_245DPS);
  //LSM9DS1_setupGyro(LSM9DS1_GYROSCALE_500DPS);
  //LSM9DS1_setupGyro(LSM9DS1_GYROSCALE_2000DPS);
}

void setup() {
  // Init Serial Monitor
  Serial.begin(115200);
  delay(1000);
  Serial.println("\nESP32 ESP-NOW LSM9DS1 sender test");
  // Set device as a Wi-Fi Station
  WiFi.mode(WIFI_STA);
  Serial.println(WiFi.macAddress());

  // Init ESP-NOW
  if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
  }

  // Once ESPNow is successfully Init, we will register for Send CB to
  // get the status of Trasnmitted packet
  esp_now_register_send_cb(OnDataSent);
  
  // Register peer
  memcpy(peerInfo.peer_addr, broadcastAddress, 6);
  peerInfo.channel = 0;  
  peerInfo.encrypt = false;
  
  // Add peer        
  if (esp_now_add_peer(&peerInfo) != ESP_OK){
    Serial.println("Failed to add peer");
    return;
  }
 Serial.println("LSM9DS1 data read demo");
  LSM9DS1();
  // Try to initialise and warn if we couldn't detect the chip
  if (!LSM9DS1_begin())
  {
    Serial.println("Oops ... unable to initialize the LSM9DS1. Check your wiring!");
    while (1);
  }
  Serial.println("Found LSM9DS1 9DOF");
  setupSensor();
}

 
void loop() {
  char text[100] = {0};
  LSM9DS1_begin();
  setupSensor();
  delay(1000);
  int16_t axhi, ayhi, azhi, mxhi, myhi, mzhi, gxhi, gyhi, gzhi ;
  byte f[20], buff[100];
  LSM9DS1_read(&axhi, &ayhi, &azhi, &mxhi, &myhi, &mzhi, &gxhi, &gyhi, &gzhi, f);  /* ask it to read in the data */
  for (int i = 0; i < 18; i++) xprintf("0x%02x ", f[i]);
  xprintf("\n");
  xprintf("Accel %#06x %#06x %#06x  ", axhi & 0xFFFF, ayhi & 0xFFFF, azhi & 0xFFFF);
  xprintf("Mag   %#06x %#06x %#06x  ", mxhi & 0xFFFF, myhi & 0xFFFF, mzhi & 0xFFFF);
  xprintf("Gyro  %#06x %#06x %#06x\n", gxhi & 0xFFFF, gyhi & 0xFFFF, gzhi & 0xFFFF);

  float accelerationx = (((float)((int16_t)(f[1] << 8) | f[0]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  float accelerationy = (((float)((int16_t)(f[3] << 8) | f[2]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  float accelerationz = (((float)((int16_t)(f[5] << 8) | f[4]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  xprintf("Acceleration X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", accelerationx, accelerationy, accelerationz);
  sprintf(text, "Acceleration X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", accelerationx, accelerationy, accelerationz);
  //Serial1.write(text);
  float magneticx = ((float)((int16_t)(f[7] << 8) | f[6]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  float magneticy = ((float)((int16_t)(f[9] << 8) | f[8]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  float magneticz = ((float)((int16_t)(f[11] << 8) | f[10]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  xprintf("magnetic X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", magneticx, magneticy, magneticz);

  float gyrox = (float)((int16_t)(f[13] << 8) | f[12]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  float gyroy = (float)((int16_t)(f[15] << 8) | f[14]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  float gyroz = (float)((int16_t)(f[17] << 8) | f[16]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  xprintf("Gyroscope X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", gyrox, gyroy, gyroz);

  /* Get a new sensor event */
  sensors_event_t a, m, g, temp;
  LSM9DS1_getEvent(&a, &m, &g, &temp);
  xprintf("\n");
  //memcpy(&myData.f, &f, sizeof(f));
  // Send message via ESP-NOW
  esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &f, sizeof(f));
   
  if (result == ESP_OK) {
    Serial.println("Sent with success");
  }
  else {
    Serial.println("Error sending the data");
  }
  delay(2000);
}

receiver

// ESP32 test of ESP-NOW - receive LSM9DS1 9-axis iNEMO inertial module data

/*
  Rui Santos
  Complete project details at https://RandomNerdTutorials.com/esp-now-esp32-arduino-ide/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files.
  
  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
*/

#include <esp_now.h>
#include <WiFi.h>
#include "Adafruit_LSM9DS1.h"

void xprintf(const char *format, ...)
{
  char buffer[256];
  va_list args;
  va_start(args, format);
  vsprintf(buffer, format, args);
  va_end(args);
  Serial.print(buffer);
}

// callback function that will be executed when data is received
void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) {
  char text[100] = {0};
  byte f[20];
  memcpy(&f, incomingData, sizeof(f));
  Serial.print("Bytes received: ");
  Serial.println(len);

  float accelerationx = (((float)((int16_t)(f[1] << 8) | f[0]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  float accelerationy = (((float)((int16_t)(f[3] << 8) | f[2]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  float accelerationz = (((float)((int16_t)(f[5] << 8) | f[4]) * LSM9DS1_ACCEL_MG_LSB_2G) / 1000) * SENSORS_GRAVITY_STANDARD;
  xprintf("Acceleration X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", accelerationx, accelerationy, accelerationz);
  sprintf(text, "Acceleration X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", accelerationx, accelerationy, accelerationz);
  //Serial1.write(text);
  float magneticx = ((float)((int16_t)(f[7] << 8) | f[6]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  float magneticy = ((float)((int16_t)(f[9] << 8) | f[8]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  float magneticz = ((float)((int16_t)(f[11] << 8) | f[10]) * LSM9DS1_MAG_MGAUSS_4GAUSS) / 1000;
  xprintf("magnetic X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", magneticx, magneticy, magneticz);

  float gyrox = (float)((int16_t)(f[13] << 8) | f[12]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  float gyroy = (float)((int16_t)(f[15] << 8) | f[14]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  float gyroz = (float)((int16_t)(f[17] << 8) | f[16]) * LSM9DS1_GYRO_DPS_DIGIT_245DPS;
  xprintf("Gyroscope X: %5.2f m/s^2 Y:  %5.2f m/s^2 Z: %5.2f m/s^2 \n", gyrox, gyroy, gyroz);

  Serial.println();
}
 
void setup() {
  // Initialize Serial Monitor
  Serial.begin(115200);
  delay(1000);
  Serial.println("\nESP32 ESP-NOW LSM9DS1 receiver test");
  // Set device as a Wi-Fi Station
  WiFi.mode(WIFI_STA);
  Serial.println(WiFi.macAddress());

  // Init ESP-NOW
  if (esp_now_init() != ESP_OK) {
    Serial.println("Error initializing ESP-NOW");
    return;
  }
  
  // Once ESPNow is successfully Init, we will register for recv CB to
  // get recv packer info
  esp_now_register_recv_cb(OnDataRecv);
}
 
void loop() {
}

sender serial monitor

08:55:31.844 -> ESP32 ESP-NOW LSM9DS1 sender test
08:55:31.948 -> 84:CC:A8:7A:56:6C
08:55:31.948 -> LSM9DS1 data read demo
08:55:31.948 -> initI2C
08:55:31.948 -> Found LSM9DS1 9DOF
08:55:32.968 -> 0xff 0x00 0xf4 0x02 0x9e 0x3d 0xe5 0xff 0x2b 0x07 0x12 0xff 0x64 0x01 0x36 0x03 0x16 0x00 
08:55:32.968 -> Accel 0x00ff 0x02f4 0x3d9e  Mag   0xffe5 0x072b 0xff12  Gyro  0x0164 0x0336 0x0016
08:55:33.001 -> Acceleration X:  0.15 m/s^2 Y:   0.45 m/s^2 Z:  9.44 m/s^2 
08:55:33.001 -> magnetic X: -0.00 m/s^2 Y:   0.26 m/s^2 Z: -0.03 m/s^2 
08:55:33.001 -> Gyroscope X:  3.12 m/s^2 Y:   7.19 m/s^2 Z:  0.19 m/s^2 
08:55:33.001 -> 
08:55:33.001 -> Sent with success
08:55:33.001 -> 
08:55:33.001 -> Last Packet Send Status:	Delivery Success
08:55:36.001 -> 0xe0 0x06 0x08 0xbe 0x83 0x07 0x0d 0x02 0x2f 0x0d 0x15 0x0f 0x6d 0x0b 0xb4 0x05 0x69 0x0c 
08:55:36.001 -> Accel 0x06e0 0xbe08 0x0783  Mag   0x020d 0x0d2f 0x0f15  Gyro  0x0b6d 0x05b4 0x0c69
08:55:36.034 -> Acceleration X:  1.05 m/s^2 Y:  -10.10 m/s^2 Z:  1.15 m/s^2 
08:55:36.034 -> magnetic X:  0.07 m/s^2 Y:   0.47 m/s^2 Z:  0.54 m/s^2 
08:55:36.034 -> Gyroscope X: 25.59 m/s^2 Y:  12.77 m/s^2 Z: 27.80 m/s^2 
08:55:36.034 -> 
08:55:36.034 -> Sent with success
08:55:36.034 -> 
08:55:36.034 -> Last Packet Send Status:	Delivery Success
08:55:39.059 -> 0xdd 0xc7 0xf3 0x12 0xe8 0x04 0x9f 0xf2 0x7d 0x01 0xbc 0x09 0xee 0x09 0xe4 0x1a 0x6d 0x07 
08:55:39.059 -> Accel 0xc7dd 0x12f3 0x04e8  Mag   0xf29f 0x017d 0x09bc  Gyro  0x09ee 0x1ae4 0x076d
08:55:39.059 -> Acceleration X: -8.60 m/s^2 Y:   2.90 m/s^2 Z:  0.75 m/s^2 
08:55:39.059 -> magnetic X: -0.48 m/s^2 Y:   0.05 m/s^2 Z:  0.35 m/s^2 
08:55:39.059 -> Gyroscope X: 22.24 m/s^2 Y:  60.24 m/s^2 Z: 16.63 m/s^2 
08:55:39.059 -> 

receiver serial monitor

08:55:28.012 -> ESP32 ESP-NOW LSM9DS1 receiver test
08:55:28.114 -> 0C:B8:15:EC:1F:D0
08:55:32.981 -> Bytes received: 20
08:55:32.981 -> Acceleration X:  0.15 m/s^2 Y:   0.45 m/s^2 Z:  9.44 m/s^2 
08:55:33.016 -> magnetic X: -0.00 m/s^2 Y:   0.26 m/s^2 Z: -0.03 m/s^2 
08:55:33.016 -> Gyroscope X:  3.12 m/s^2 Y:   7.19 m/s^2 Z:  0.19 m/s^2 
08:55:33.016 -> 
08:55:36.012 -> Bytes received: 20
08:55:36.045 -> Acceleration X:  1.05 m/s^2 Y:  -10.10 m/s^2 Z:  1.15 m/s^2 
08:55:36.045 -> magnetic X:  0.07 m/s^2 Y:   0.47 m/s^2 Z:  0.54 m/s^2 
08:55:36.045 -> Gyroscope X: 25.59 m/s^2 Y:  12.77 m/s^2 Z: 27.80 m/s^2 
08:55:36.045 -> 
08:55:39.072 -> Bytes received: 20
08:55:39.072 -> Acceleration X: -8.60 m/s^2 Y:   2.90 m/s^2 Z:  0.75 m/s^2 
08:55:39.072 -> magnetic X: -0.48 m/s^2 Y:   0.05 m/s^2 Z:  0.35 m/s^2 
08:55:39.072 -> Gyroscope X: 22.24 m/s^2 Y:  60.24 m/s^2 Z: 16.63 m/s^2 
08:55:39.072 -> 
08:55:42.106 -> Bytes received: 20
08:55:42.106 -> Acceleration X: 10.34 m/s^2 Y:  -2.70 m/s^2 Z: -0.77 m/s^2 
08:55:42.106 -> magnetic X:  0.44 m/s^2 Y:   0.26 m/s^2 Z:  0.47 m/s^2 
08:55:42.106 -> Gyroscope X: -1.88 m/s^2 Y:  18.26 m/s^2 Z: -88.69 m/s^2 
08:55:42.106 -> 

No you didn't.

The values of a, g and temp are never transferred to myData.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.