-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix README instructions #13
base: main
Are you sure you want to change the base?
Conversation
As a side note, I guess some more commands needs to be sent into the socket to properly configure the device. As if I open torque and then my app everything works just fine, while if I connect the ODB device and open directly my app I get a bunch of garbage data. Any help in that direction will be more than appreciated, so that I can include it in this PR. |
There are some init commands that you need to send over to setup the connection. Here is a snippet from an app I have connecting to the ELM327 device and right after this block it sends a normal request for a pid and they work.
|
Im sure this code can be cut down from instructions |
@@ -18,9 +18,10 @@ Code: | |||
``` | |||
//Request MODE 1, PID 0C - RPM | |||
val pid = PID(ObdModes.MODE_01, "0C") | |||
pid.formula = "(256A+B)/4" // Engine RPM formula https://en.wikipedia.org/wikiOBD-II_PIDs#Service_01 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont have to build this PID yourself.
You can request a fully built pid from the built in library this way:
val pid = PIDUtils.getPid(ObdModes.MODE_01, "OC")
Hi,
I would first like to thank you for this very useful library.
I started using it with my simulated ECU: https://github.com/spoonieau/OBD2-ECU-Simulator but I was not getting out the right data, while Torque or other ODB apps were able to get them.
I found that the readme lacked some PID configuration for the command to parse the data.
So before I got this data:
Then after passing the right parameters to the PID I got ( I configured the simulator to 2000RPM):
I hope this will be helpful to other developers using this library.