Skip to menu

Robotics with Object Pascal

ESP32-S3 super mini experience

Formating output

2025.04.27 19:53

me Views:34

  // Predefined "char s[100];" // for formatted output using sprintf
  // accel in g, gyro in deg/s, mag in µTesla, temp in °C
  sprintf(s, "<I-AGMT:%6.3f, %6.3f, %6.3f, %7.2f, %7.2f, %7.2f, %6.2f, %6.2f, %6.2f, %5.1f>",
     gValue.x, gValue.y, gValue.z,
     gyr.x, gyr.y, gyr.z,
     magValue.x, magValue.y, magValue.z, temp);
  Serial.println(s);

Formating_Output.png