I am currently having 2 issues with the particle tracker one (I used Boron on my previous project and it was a successful project).
---- First Issue: Slow EEPROM Writes ----
Here is the test code:
// Must call this on every loop
Tracker::instance().loop();
// EEPROM Test Write
tempCtr = 0;
Log.info("EEP Test Write 1");
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
tempCtr = 0;
Log.info("EEP Test Write 2");
// more test code below
Here are the timings:
HH:MM:ss.sss
00:20:55.458 → 0000048501 [app] INFO: EEP Test Write 1
00:20:57.181 → 0000050273 [app] INFO: EEP Test Write 2
Another test:
00:21:17.496 → 0000070611 [app] INFO: EEP Test Write 1
00:21:19.273 → 0000072363 [app] INFO: EEP Test Write 2
It goes past 1 second and for this small set of data, we were actually expecting it to be less than 100 milliseconds.I am wondering about this because on my previous project using the Boron, the EEPROM write is incredibly fast.
Maybe there is a configuration we are missing for the EEPROM write? We are using the tracker edge firmware as the template. This project uses CAN, in case that info matters. But on this examples, no CAN transactions were used.
----- Second Issue: Delay ----
// Must call this on every loop
Tracker::instance().loop();
// EEPROM Test Write
Log.info("EEP Test Write 1 Start");
uint8_t tempCtr = 0;
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
EEPROM.write(tempCtr++, tempCtr);
Log.info("EEP Test Write 1 End");
delay(5000);
The delay(5000) is inconsistent and sometimes I am seeing a delay of up to 15 seconds on this part.
I created my own delay to replace that:
void DelayMs(uint32_t delayms)
{
uint32_t recordedmillis = millis();
while(millis()-recordedmillis<delayms)
{
Tracker::instance().loop(); // maybe I need to keep on calling this
}
}
Then I use
DelayMs(5000);
Even with this, I am getting inconsistent delays. I am ok with 1 or 2 seconds discrepancy in delays, however I am sometimes seeing 15 to 20 seconds delay on this.