Go Down

Topic: Problem with reading sensor (Read 1 time) previous topic - next topic


Ok I found some function which counts how many free memory I have. And the result was 638 bytes of free memory. I'm still a beginner in arduino and it hard to say for me is it big or small.

Which library is those streaming?


Which library is those streaming?

This is supported because of the Streaming library. You do not explicitly include the Streaming library, so either SdFat or OBD is, although that should not be possible.

Code: [Select]
          sdlog << "PID_RPM: " << rpm << ";PID_SPEED: " << speed_ << ";PID_THROTTLE: " << throttle << ";PID_FUEL_LEVEL: " << fuel << ";PID_DISTANCE: " << dist << endl;

638 bytes should be plenty, but, of course, that depends on where you measured that value.

I'd try Serial.print()ing the values, to make sure that they are indeed correct. No sense chasing a bug in the wrong place.


I think I found root of this problem. OBD2 library which I use somehow doesn't allow me to read more than one PID. When I want to read two or more it reads only the first one. Now the tricky part. Does anyone of you have any idea how to solve this issue.


Dec 26, 2012, 01:24 pm Last Edit: Dec 26, 2012, 01:29 pm by wildbill Reason: 1
The library intro at link you provided implies that the library can read multiple sensors, although their example there  doesn't show it. Look at the dashboard_1602 example though and you see that multiple PIDs are being read, corresponding to which mode the device is in.

I suggest you try writing a minimalist program that reads two pids and displays the result, on the serial port for preference, and build up from there.

edit: grammar

Go Up