Skip to content

Instantly share code, notes, and snippets.

@seanboe
Created June 17, 2023 03:09
Show Gist options
  • Save seanboe/2f2a2ebc2e332056da10b689cb6c9232 to your computer and use it in GitHub Desktop.
Save seanboe/2f2a2ebc2e332056da10b689cb6c9232 to your computer and use it in GitHub Desktop.
void hlcReport() {
if (micros() - hlcReportPrevUpdate > HLC_REPORT_INTERVAL) {
char report[100];
sprintf(report, "[%lu,%s,%s,%s,%s]", millis(), String(batt1V, 3).c_str(), String(batt1Curr, 3).c_str(), String(batt2V, 3).c_str(), String(batt2Curr, 3).c_str());
Serial.write(report);
memset(report, 0, sizeof(buffer));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment