Getting Data from IMU to IoT Cloud

Hi,
I'm a new user to Arduino IoT Cloud and so have little experience using it.
My aim is to send data from my IMU such as 3 axis acceleration and 3 axis angular velocity to the IoT cloud so that it can be displayed to a user on the dashboard in real time.
I am able to obtain the data I want from the IMU and stream it to the serial monitor and plotter, however I whenever I try to send this to the dashboard, it causes an error.
My hardware is a Adafruit BNO055 IMU and Seed Studio Xiao ESP32-C3.
Please see current code below, (I'm focusing on getting data in the x axis first before expanding to others)

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/90a9c6b7-46b0-4162-b40a-830ef68b9b51 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  float acceleration_X;
  float acceleration_Y;
  float acceleration_Z;
  float ang_Vel_X;
  float ang_Vel_Y;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
#include <math.h>

#define BNO055_SAMPLERATE_DELAY_MS (100)

Adafruit_BNO055 myIMU = Adafruit_BNO055();

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();

  myIMU.begin();
  delay(1000);
  int8_t temp=myIMU.getTemp();
  myIMU.setExtCrystalUse(true); //Use crystal on board not chip
  
}

void loop() {
  ArduinoCloud.update();
  uint8_t system, gyro, accel, mg =0;
  
myIMU.getCalibration(&system, &gyro, &accel, &mg);

imu::Vector<3> acc =myIMU.getVector(Adafruit_BNO055::VECTOR_ACCELEROMETER);


acceleration_X = acc.x

Serial.println(acc.x()/9.8);
  
}

Here is the error message:

Any pointers on where I might be going wrong or helpful tips to try would be much appreciated.
Thanks!

Hi @sammully24.

Do you notice a difference between the two lines?

acc.x is a function that returns the X axis value. When we call a function in an Arduino sketch, the function name must be followed with parentheses, which contain any arguments to be passed to the function's parameters. For example, if there was a function named someFunction, which did not have any parameters, then I would add this code to my sketch to call the function:

someFunction();

Do you see the problem with your code now?

That's solved it!!
Thanks so much!

You are welcome. I'm glad it is working now.

Regards, Per