Adding and modifying PIDS.

Inquiry and support for Freematics products
Post Reply
aslak
Posts: 2
Joined: Tue Jan 20, 2015 5:26 pm

Adding and modifying PIDS.

Post by aslak »

Hi,

Thanks for the great product! I like it alot.

I'm having some trouble understanding the library and how the calculation of PIDs work. Could someone please give some insight on this? I'm using the UART version.

Eg 1. Wikipedia states that the calculation formula for Intake air temperature is A-40.

In the library the were Intake air is calculated I see no formula calculation:

case PID_INTAKE_TEMP:

Eg 2. Wikipedia states that the calculation formula for Fuel pressure A*3

In the library the were Fuel pressure is calculated I see this calculation:

case PID_FUEL_PRESSURE:
result = getSmallValue(data) * 3;
break;



These are just a few examples that I took the time on looking upon.

Thanks!

-aslak
lordsirius
Posts: 2
Joined: Sat Apr 25, 2015 6:19 pm

Re: Adding and modifying PIDS.

Post by lordsirius »

I have more or less the same question. I need to add a custom PID to get oil temp working for my car. (toyota gt86 aka subaru brz aka scion fr-s)

This is what has to be configured in the "Torque" App but I can't find anything similar in the ODB library or the nanologger Sketch.

Code: Select all

OBD2 Mode and PID: 2101
Minimum Value: -40
Maximum Value: 215
Scale factor: x1
Unit type: C
Equation: AC-40 (no space between A and C; "AC" is the location within the response)
OBD Header: 7E0
stanley
Site Admin
Posts: 1018
Joined: Sat Mar 01, 2014 3:15 am

Re: Adding and modifying PIDS.

Post by stanley »

To request for PID 2101 (if it's valid in your car), you can do like this:

Code: Select all

int value;
obd.dataMode = 2;
if (obd.read(1, value)) {
  // do something with 'value'
}
lordsirius
Posts: 2
Joined: Sat Apr 25, 2015 6:19 pm

Re: Adding and modifying PIDS.

Post by lordsirius »

I'll try. Thanks!
Monroe07
Posts: 4
Joined: Sun Oct 11, 2015 10:40 am

Re: Adding and modifying PIDS.

Post by Monroe07 »

Hey So I've got some PIDs that have different headers... like 07E2015B (Presumably State Of Charge) has a 07E presumably the 2 means mode 2, and the 015B is the actual PID.

Whereas, 07C02129 (Presumably Fuel Level) has a header of 07C. Is that accounted for in the library? and if not, How do I modify/add that?
Post Reply