Page 1 of 1

PID poll in batch ??

Posted: Tue Jan 08, 2019 8:40 am
by TheMonkey
PID polls are requiring 125ms +/- 5ms each poll and really making for a clunky routine when fetching one after another. ISO 9141 on 1998 Toyota.

Can anything be done to fetch multiple variables in one poll?

stampTime = millis();
obd.readPID(PID_THROTTLE, throttle);
throttleTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_RPM, rpm);
rpmTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_COOLANT_TEMP, coolant);
coolantTime = millis() - stampTime;

stampTime = millis();
obd.readPID(PID_SPEED, speed);
speedTime = millis() - stampTime;

Re: PID poll in batch ??

Posted: Sat May 11, 2019 4:33 am
by aboaboit
Good thing I increased the minimum cycle time in datalogger from the default 100ms to 250ms.
I'm going to try to raise it further.