Problem getting PIDs in ONE+ datalogging
Posted: Sat Dec 23, 2017 3:01 am
Hi,
I have a problem I can't solve, which seems to be easy, but I'm a noob with arduinos and programming.
I've been using the ONE+ for datalogging.
First, it worked fine with RPM, TPS and those variables the datalogger.ino has on github.
I want to log PID_FUEL_INJECTION_TIMING and others and I removed the PID of load and overwrite the injection timing. But when I upload the new program with the arduino builder, it doesn't do anything. The ONE+ logs RPM and TPS but no more.
How do you change the program to log other PIDs? I put this:
#if USE_OBD
if (one.state & STATE_OBD_READY) {
byte pids[]= {PID_RPM, PID_THROTTLE, PID_FUEL_INJECTION_TIMING , PID_AIR_FUEL_EQUIV_RATIO};
one.dataTime = millis();
for (byte i = 0; i < sizeof(pids) / sizeof(pids[0]); i++) {
int value;
byte pid = pids[i];
if (one.readPID(pid, value)) {
one.log((uint16_t)pids[i] | 0x100, value);
}
Should it work?
I enable the USE OBD and DATA LOGGING in the config section of arduino builder.
I tried marking or not the rebuild core and rebuild libs and neither of those options make any difference.
I have a problem I can't solve, which seems to be easy, but I'm a noob with arduinos and programming.
I've been using the ONE+ for datalogging.
First, it worked fine with RPM, TPS and those variables the datalogger.ino has on github.
I want to log PID_FUEL_INJECTION_TIMING and others and I removed the PID of load and overwrite the injection timing. But when I upload the new program with the arduino builder, it doesn't do anything. The ONE+ logs RPM and TPS but no more.
How do you change the program to log other PIDs? I put this:
#if USE_OBD
if (one.state & STATE_OBD_READY) {
byte pids[]= {PID_RPM, PID_THROTTLE, PID_FUEL_INJECTION_TIMING , PID_AIR_FUEL_EQUIV_RATIO};
one.dataTime = millis();
for (byte i = 0; i < sizeof(pids) / sizeof(pids[0]); i++) {
int value;
byte pid = pids[i];
if (one.readPID(pid, value)) {
one.log((uint16_t)pids[i] | 0x100, value);
}
Should it work?
I enable the USE OBD and DATA LOGGING in the config section of arduino builder.
I tried marking or not the rebuild core and rebuild libs and neither of those options make any difference.