OBD reconect
Posted: Sat Oct 16, 2021 8:23 pm
I am connecting the Freematics ONE+ to my obd port of the car it receives power turns on and waiting in the loop .
if (!connected) {
digitalWrite(PIN_LED, LOW);
Serial.print("Connecting to OBD...");
if (obd.init()) {
Serial.println("OK");
digitalWrite(PIN_LED, HIGH);
connected = true;
sys.buzzer(2000);
delay(100);
sys.buzzer(0);
delay(100);
sys.buzzer(2000);
delay(100);
sys.buzzer(0);
} else {
Serial.println();
}
return;
}
After turning the key to on position it continues and everything is ok.
when i turn the key to off , the Freematics ONE+ disconects from obd and not connectcing until i take it out of the obd plug and insert it back.
if (obd.errors > 2) {
Serial.println("OBD disconnected");
connected = false;
obd.reset();
digitalWrite(PIN_LED, LOW);
sys.buzzer(1000);
delay(100);
sys.buzzer(0);
}
Any idea on how to proceed ?
if (!connected) {
digitalWrite(PIN_LED, LOW);
Serial.print("Connecting to OBD...");
if (obd.init()) {
Serial.println("OK");
digitalWrite(PIN_LED, HIGH);
connected = true;
sys.buzzer(2000);
delay(100);
sys.buzzer(0);
delay(100);
sys.buzzer(2000);
delay(100);
sys.buzzer(0);
} else {
Serial.println();
}
return;
}
After turning the key to on position it continues and everything is ok.
when i turn the key to off , the Freematics ONE+ disconects from obd and not connectcing until i take it out of the obd plug and insert it back.
if (obd.errors > 2) {
Serial.println("OBD disconnected");
connected = false;
obd.reset();
digitalWrite(PIN_LED, LOW);
sys.buzzer(1000);
delay(100);
sys.buzzer(0);
}
Any idea on how to proceed ?