"help" Engine light (on/off)

Check this out for the Flashing Part

Maybe check the vehicle RPM if it’s equal to 0 then its count as of else then its on?

Just a theory