This kind of issue occur when the main loop is not OK.View attachment 1483
Is it possible that the odometry runs in the wrong direction? Or the motor turns in the wrong direction?
Or is this ok?
If motor is not correctly wired the test ODO, maual drive ETC ... don't work well.Sollte doch beim brushless Motor egal sein wierum er läuft oder!?
Meine Motoren sind so angeschlossen... grün blau gelb!
Oder sollte mann sich an solchen Bildern orientieren wegen der fasen (MA MB MC)
Are you sure the SD Card is OK.
Can you try to remove it ?
void Robot::writeOnSD(String message) {
StartReadAt = millis();
if (sdCardReady) {
//filename is reset into :loadSaveRobotStats
File dataFile = SD.open(historyFilenameChar, FILE_WRITE);
if (dataFile) {
dataFile.print(message);
dataFile.close();
}
totalLineOnFile = totalLineOnFile + 1;
if (totalLineOnFile >= 1000) { // create a new log file if too long
totalLineOnFile = 0;
sprintf(historyFilenameChar, "%02u%02u%02u%02u%02u.txt", datetime.date.year - 2000, datetime.date.month, datetime.date.day, datetime.time.hour, datetime.time.minute);
}
}
EndReadAt = millis();
ReadDuration = EndReadAt - StartReadAt;
if ( ReadDuration > 100) {
ShowMessage("Warning SD card Write duration > 100 ms : ");
ShowMessageln(ReadDuration);
ShowMessageln("SD card is desactivate");
sdCardReady = false;
}
}
void Robot::writeOnSDln(String message) {
StartReadAt = millis();
if (sdCardReady) {
//filename is reset into :loadSaveRobotStats
File dataFile = SD.open(historyFilenameChar, FILE_WRITE);
if (dataFile) {
dataFile.println(message);
dataFile.close();
}
totalLineOnFile = totalLineOnFile + 1;
if (totalLineOnFile >= 1000) { // create a new log file if too long
totalLineOnFile = 0;
sprintf(historyFilenameChar, "%02u%02u%02u%02u%02u.txt", datetime.date.year - 2000, datetime.date.month, datetime.date.day, datetime.time.hour, datetime.time.minute);
}
}
EndReadAt = millis();
ReadDuration = EndReadAt - StartReadAt;
if ( ReadDuration > 100) {
ShowMessage("Warning SD card Write duration > 100 ms : ");
ShowMessageln(ReadDuration);
ShowMessageln("SD card is desactivate");
sdCardReady = false;
}
}
Nein das könnte ich mal probieren. Danke...Have you ever deactivated everything that is not needed for tracking? Also physically separated from the pcb?
@Richtel
You can test this new function of code (into robot.cpp) replace the actual one by this.
Code:void Robot::writeOnSD(String message) { StartReadAt = millis(); if (sdCardReady) { //filename is reset into :loadSaveRobotStats File dataFile = SD.open(historyFilenameChar, FILE_WRITE); if (dataFile) { dataFile.print(message); dataFile.close(); } totalLineOnFile = totalLineOnFile + 1; if (totalLineOnFile >= 1000) { // create a new log file if too long totalLineOnFile = 0; sprintf(historyFilenameChar, "%02u%02u%02u%02u%02u.txt", datetime.date.year - 2000, datetime.date.month, datetime.date.day, datetime.time.hour, datetime.time.minute); } } EndReadAt = millis(); ReadDuration = EndReadAt - StartReadAt; if ( ReadDuration > 100) { ShowMessage("Warning SD card Write duration > 100 ms : "); ShowMessageln(ReadDuration); ShowMessageln("SD card is desactivate"); sdCardReady = false; } } void Robot::writeOnSDln(String message) { StartReadAt = millis(); if (sdCardReady) { //filename is reset into :loadSaveRobotStats File dataFile = SD.open(historyFilenameChar, FILE_WRITE); if (dataFile) { dataFile.println(message); dataFile.close(); } totalLineOnFile = totalLineOnFile + 1; if (totalLineOnFile >= 1000) { // create a new log file if too long totalLineOnFile = 0; sprintf(historyFilenameChar, "%02u%02u%02u%02u%02u.txt", datetime.date.year - 2000, datetime.date.month, datetime.date.day, datetime.time.hour, datetime.time.minute); } } EndReadAt = millis(); ReadDuration = EndReadAt - StartReadAt; if ( ReadDuration > 100) { ShowMessage("Warning SD card Write duration > 100 ms : "); ShowMessageln(ReadDuration); ShowMessageln("SD card is desactivate"); sdCardReady = false; } }