If you just want PID data, then the iso_write_data() function should suffice as is. Just look at the function get_pid() to see what OBDuino does to ask for PID information.
I'm not sure how you are interfacing the laptop to the OBDuino, but I assume the computer will just send a PID request through the USB port as a single character (the PID value), then wait for a data reply of some sort.
OBDuino could simply wait for data from the USB port, when it finds some, it would call get_PID() function and then send the ECU reply back to the USB port.
Depending on your laptop program, you could send just the raw data, or the raw data, and the string back over the USB port.
Does this help?
|