Currently I am working on an app where I have established a connection with OBD II ELM 327 adapter and I can read data from OBD II. e.g. I have used OBD command "01 0C" to get rpm of vehicle.
I want to retrieve real time data e.g. speed or rpm from vehicle. This is the point where I am stuck. I am not getting - "How I can continuously fetch such real time data from vehicle?
I know, OBD II is responding to my every AT or OBD command. What I think is, if I send any command to OBD II adapter repeatedly, it will send data back every time.
Can anyone tell me, how I can send single command e.g. "01 0C" continuously? Which method I should use to fetch real data from vehicle?
Please, someone guide me to sort out this. Any guidance will be a great help.
Thank you.
To perform continuous communication with an OBD-II ELM-327 there is no other option than to ask the device periodically for the data. I've done that succesfully for an application.
Also, check Eric Smekens' answer in the following thread:
Send multiple OBD commands together and get response simultaneously
to speed up communications.