Having trouble getting ICM 20948 IMU data to send over XBEE S2C modules


I am trying to get IMU data from a ICM 20948 sensor to transmit through an XBee S2C pair with an XBee shield for each. The XBees have been set to 9600 baud rate and one is a coordinator while the other is a end device. I have tested the end device receiving data using premade dummy data packages to represent 3 axis accelerometer data and it prints the data fine. The ICM 20948 is connected to an Arduino Uno through I2C while the XBee is connected through SPI. Despite no errors being found in the code when verified the IMU data recorded as integers does not seem to be transmitting when connected to the ICM 20948. Additionally, the IMU data is being told to be serial printed just before being transmitted. It should also be noted that the XBee receiving the IMU data does receive a single 3 on the serial monitor but I am uncertain as to why.

Any suggestions on how to get the IMU data to transmit from one XBee to another?

Below are the files used

Transmit_Dummy_data.ino (2.02 KB)

IMU_Xbee_v1.ino (17.1 KB)

Experiment3_receive.ino (8.59 KB)