ESP32 cansat next
From wikiluntti
Introduction
Some interesting coding stuff
snprintf
printf, print
Each ASCII character takes 1 byte. You can store exactly 128 ASCII characters in the above char array.
char report[128];
memset(report, 0, sizeof(report));
snprintf(report, sizeof(report), "%4.2f, %4.2f, %4.2f, %4.2f, %4.2f, %4.2f",
ax, ay, az, gx, gy, gz);
Serial.println(report);
Radio
To send strings, use sendData( str );
command.
SD Card
First, open the file
const String filepath = "/filename.csv";
and then append the data and linebreak
appendFile(filepath, data);
appendFile(filepath, "\n");