Strana 70 z 73
Poznámky redaktora
0);
float resistance (SERIES_RESISTOR (3.Accel Z.exists(curFile));
File SD.println(CSV_HEADER); f.endTransmission();
delay(1000);
Serial.toInt();
if (idx fileIndex) fileIndex idx;
}
f.Az (m/s2).3 4095.0 (NOMINAL_TEMPERATURE 273.csv") n.beginTransmission(0x68);
Wire.close();
Serial.csv", fileIndex); }
while (SD.3 voltage)) voltage;
float log(resistance NOMINAL_RESISTANCE) /
BETA_COEFFICIENT;
st 1.Pitch (deg).openNextFile();
}
root.70
// ---------- CSV hlavička ----------
const char *CSV_HEADER =
"Time (ms).csv"
if (n.substring(9, 12).println("Chyba tvorby logu!");
}
}
.close();
}
void createNewLogFile() {
do fileIndex++; sprintf(curFile, "/datalog_%03u.', ','); return s;
}
void bmiAutoCalibrate() {
Wire.Gyro Z.Accel X.Temp_Motor.Voltage (V)."
"Gyro X.name(); "/datalog_123.Gyro Y.Ay (m/s2).Power (W).startsWith("/datalog_") n.write(0x37); Wire.replace('.length()
== 15) {
uint16_t idx n.0 st) 273.Energy (Wh).write(0x7E); Wire.println("BMI160 auto-kalibrace dokončena");
}
// ---------- utilities ----------
void findLastIndex() {
fileIndex 0;
File root SD.close();
f root.open(curFile, FILE_WRITE);
if (f) f.Roll (deg).endsWith(".Temp_Ambient";
// ---------- pomocné funkce ----------
float getTemperature(int pin) {
float voltage analogRead(pin) (3.Current (A)."
"Temp_Battery.openNextFile();
while (f) {
String f.open("/");
File root.15);
return (1."
"Ax (m/s2).Accel Y.15;
}
String floatToStringComma(float value, uint8_t decimals) {
char buf[24]; dtostrf(value, decimals, buf);
String s(buf); s.println("Nový log: String(curFile));
} else {
Serial