OBD2 How can I check that the ignition is off

I connected to OBDKey and received the data. I want to immediately close my program when the car is turned off (ignition off). How can I check that the ignition is off?

+3
source share
2 answers

How about using the RPM value from the motor controller to determine that the motor is stopped? Use OBDKey to use the command 010C\r. this will happen 41 0C 00 00if the engine is not running or NO DATAif the ECU is already turned off.

+5
source

If you are using a chipset ELM327, you can use a command ATIGNthat will respond with ONor OFF.

, . OBD2 , , ON, . . ELM327 ATIGN "" .

0

Source: https://habr.com/ru/post/1757119/


All Articles