Strana 66 z 73
Poznámky redaktora
toInt();
if (idx fileIndex) fileIndex idx;
}
f.length()
== 15) {
uint16_t idx n.3 1.endsWith(".startsWith("/datalog_") n.write(0x37);
Wire.println("BMI160 Auto-calibration done");
}
// ---------- utilities ----------
void findLastIndex() {
fileIndex 0;
File root SD.openNextFile();
}
root.0;
float SERIES_RESISTOR (3.15));
return 273.open("/");
File root.substring(9, 12).0 (st B_COEFFICIENT +
1.name(); "/datalog_123.3 4095.exists(curFile));
.write(0x7E);
Wire.csv", fileIndex);
} while (SD.', ',');
return s;
}
// ---------- RS-485 driver ----------
void preTx() digitalWrite(RS485_DE, HIGH); }
void postTx() digitalWrite(RS485_DE, LOW); }
// ---------- NTC ----------
float ntcTemp(int pin) {
int adc analogRead(pin);
float adc 3.0 (NOMINAL_TEMPERATURE 273.close();
}
void createNewLogFile() {
do {
fileIndex++;
sprintf(curFile, "/datalog_%03u.csv"
if (n.15;
}
// ---------- BMI160 auto-kalibrace ----------
void bmiAutoCalibrate() {
Wire.0);
float log(R NOMINAL_RESISTANCE);
st 1.csv") n.close();
f root.beginTransmission(I2C_ADDR);
Wire.66
// ---------- pomocné funkce ----------
String floatComma(float uint8_t dec {
char buf[24];
dtostrf(v, dec, buf);
String s(buf);
s.replace('.endTransmission();
delay(1000);
Serial.openNextFile();
while (f) {
String f