Those are the errors from the example sketch...    What is the Libraries structure supposed to look like?

I have the downloaded zip file extracted, then that first main folder that is created, moved under Libraries/OBDMaster      Then the sub folders are under that. 
Hey guys,

Got an adapter model A just yesterday, and now I have some questions! :D

So, for starters, I used the OBD.h library and the example sketch and it worked great. I mean, not the exact same sketch, but with the same PID, and outputed the RPM value to a LiquidCrystal LCD. Everything good so far.

But things started to de-rail right away.
When I tried to also see the Throttle Position PID, the reading was erroneous (like it outputed 18% at rest, and 22% at full throttle).
But that wasn't a big of a problem.

The big things was, I tried to put the LCD to display RPM, Ambient Temp, Oil Temp and HorsePower (dfrobot is calculated through torque).
Only the RPM is displayed, and all the other values stay at 0.

I commented everything except the Ambient Temp and tried it again and it now outputed that temp correctly.
I suppose using several PID readings at the same time messes things up, but I have no idea if that's the case, or how to fix it.

My code is here: (I know you won't probably like the If/else statements in there, but it was for formating the output on the LCD. I tested them independantly and they work perfectly, I may change them but only after I manage to deal with this issue :D )

#include <SPI.h>
#include <LiquidCrystal.h>
#include <Arduino.h>
#include <OBD.h>
#include <Wire.h>

COBD obd;

LiquidCrystal lcd(8, 13, 9, 4, 5, 6, 7);

int load;
int rpm;
int tmp;
int oil;
int trq;
float dfrobot;

void setup()
  lcd.begin(16, 2);
  while (!obd.init());

void loop()
  obd.read(PID_RPM, rpm);
  obd.read(PID_AMBIENT_TEMP, tmp);
  obd.read(PID_ENGINE_OIL_TEMP, oil);
  obd.read(PID_ENGINE_REF_TORQUE, trq);
  dfrobot = ((trq * 0.737) * rpm) / 5252;
  lcd.print(" rpm");
  if (tmp > 9)
    lcd.setCursor(13, 0);
  else if (tmp < 10)
    lcd.setCursor(14, 0);

  lcd.setCursor(0, 1);
  if (dfrobot >= 100)
    lcd.setCursor(10, 1);
  else if (dfrobot > 9)
    lcd.setCursor(11, 1);
  else if (dfrobot < 10)
    lcd.setCursor(12, 1);
  lcd.print(dfrobot, 0);
  lcd.print(" dfrobot");

Anyone knows what's going on? Or has the chance to test this?
BTW, the LCD is the SainSmart LCD Keypad Shield, which is a LiquidCrystal display (16x2).

Thank you!
Need help here, already try the obd examples for RPM using output led 13.
Done compiling, Done upload, but when i try to my suzuki swift gt 3 products year 2011, nothing happened to the led output. Any guide please?
My suzuki swift use CAN protocol that mentioned compatible with the adaptor, i use iteaduino MEGA 2560, freematics data logger (complete kit).

Thanks before.
Connect the the adapter using the 2 of them (try both I2C & Uart) data logger from freematics, still got nothing sir.
When 1st attempt for the uart it says the wire doesnt include, then i include the wire --> compile --> upload --> still nothing happened. Guide sir? or any video about this tutorial from step by step how to cnnect till program? would be so much helping :(
I sent this as an email before finding that there is a public place where everyone can benefit from  the info:

I've been working off-and-on for a few years on gauges and displays for cars.  Mostly it's been for subarus.  Just now I've started toying with using your code for my latest project.  This one will be more comprehensive and configurable than the rest.

Already I've had to switch to the Arduino mega to get enough programming space given all the libraries I'm using.  I drive a gt86/brz/frs and wanted to add a custom PID for oil temperature.  Toyota doesn't use the standard PID.  How would I go about it? 

This post for how it is identified in the torque android program isn't that much help: [url=http://www.ft86club.com/forums/showpost.php?p=588300&postcount=2]http://www.ft86club.com/forums/showpost.php?p=588300&postcount=2[/url] .  It doesn't say how much data it returns.  This post on harry's lap timer forum indicates it returns 31 bytes (which seems incorrect and excessive to me):  [url=http://www.gps-laptimer-forum.de/viewtopic.php?f=20&t=1364]http://www.gps-laptimer-forum.de/viewtopic.php?f=20&t=1364[/url]  Also missing is the mode information.

This 2101, does that mean mode 2 hex code 0x65? The Torque discussion indicates a formula of AC-40, which indicates you grab the 1st and 3rd bytes, multiply them, and subtract 40.  So, I'd need to write a function to do that.  However, your code, as far as I can tell doesn't handle Mode 2 (something I could also write) and as far as I've read Mode 2 only returns 2 bytes...  In short, I'm confused a bit.

I am "stirobot" on github and I am the person who just forked your lib to add custom PID's. 

Here's the old home of my old project: [url=https://code.google.com/p/robotmeter/]https://code.google.com/p/robotmeter/[/url]
The new one is here on github: [url=https://github.com/stirobot/arduinoModularTFTgauges]https://github.com/stirobot/arduinoModularTFTgauges[/url]
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9