#5775

I bought the OBD II Adapter because I want  control  Leds. The idea ist that the car speed kontrolls the leds. I have used the PID_SPEED funktion but it does not work?
I use the Arduino Mega 2560 R3. I have connectet the yellow cable with Rx0 and the blue with Tx0.  The  green cable have i connectet to the GND at the ICSP and the red cable at the 5 V at the ICSP. Is this correct?
I have tryed the sample with the RPM on an Arduino UNO an it works. Where is my problem?
#5777
Hi,
My car uses ISO9141 and I don't know where to start.. tried a few things using the library provided but no luck so far.
Could you please provide example code or point me in the right direction?

Thanks in advance.
#5783
All I'm really hoping for is a response of how far off base I am here...

I'm new, obviously, to writing code and Arduino and all that jazz but i'm really just trying to learn and understand everything and I want to write a code myself to connect the Arduino and read my vehicles speed only. I just want to know how far off base I am with this and maybe get some suggestions of material I should read into and include to expand my knowledge and possible getting something to work JUST for collecting speed...

[code]#include <Arduino>
#include <Wire.h>
#include "MultiLCD.h"
#include <SoftwareSerial.h>
LCD_SSD1306 lcd;
#define OBD2 Serial
int myspeed = 0;

void setup()
{
  lcd.begin();
  OBD2.begin(9600);
  while (!OBD2);
  OBD2.print("AT SP 0");
}

void loop()
{
  if (OBD2.available()>0)
  {
    OBD2.print("010D");
    myspeed = OBD2.read();
    lcd.print("My speed is: ");
    lcd.print(myspeed, DEC);
  }
  delay(1000);
}[/code]

I'm so knew to code, I don't even know how embarrassed I should feel about what I just posted here :-\
#5785
Hello Stanley,

I've seen the megalogger code and it does compile so there are no errors. I have the obd2 uart adapter,iteadduino and the 2.8" display.

I just want to be able to read the car specs off of the screen. i dont need the gps. How can i change the code to make it simpler?

Thank you
#5786
I am having trouble getting my OBD/arduino setup to work with my VW. It is OBDII certified, but the results are inconsistent, sometimes it connects and works fine, sometimes it doesn't. I am not super proficient with code, so please don't explain things in super complex language. Thanks.

Mighty Zy
#5787
When I build the OBD Logger, I get numerous errors:
|

obdlogger.ino|176|error: could not convert 'init()' to 'bool'|
obdlogger.ino|176|error: in argument to unary !|
obdlogger.ino|185|error: 'readSensor' was not declared in this scope|
obdlogger.ino||In member function 'void CLogger::LogData(byte)':|
obdlogger.ino|501|error: 'sendQuery' was not declared in this scope|
obdlogger.ino|505|error: 'dataIdleLoop' was not declared in this scope|
obdlogger.ino|518|error: 'getResponse' was not declared in this scope|
obdlogger.ino|528|error: 'normalizeData' was not declared in this scope|
obdlogger.ino|561|error: 'dataIdleLoop' was not declared in this scope|
obdlogger.ino||In member function 'void CLogger::ShowECUCap()':|
obdlogger.ino|588|error: 'isValidPID' was not declared in this scope|
obdlogger.ino|593|error: 'isValidPID' was not declared in this scope|
obdlogger.ino||In member function 'void CLogger::Reconnect()':|
obdlogger.ino|605|error: could not convert 'init()' to 'bool'|
obdlogger.ino|605|error: in argument to unary !|
obdlogger.ino||In function 'void setup()':|
obdlogger.ino|739|error: 'class CLogger' has no member named 'begin'|
||=== Build finished: 13 errors, 51 warnings (0 minutes, 12 seconds) ===|

Am I doing something wrong?
#5788
[quote="Gatorjon"]
When I build the OBD Logger, I get numerous errors:
|

obdlogger.ino|176|error: could not convert 'init()' to 'bool'|
...

Am I doing something wrong?
[/quote]

Looks like you are missing the library. Did you #include "obd.h" and are the files in your arduino libraries folder.
The obd.h and obd.cpp files contain the code that tells the arduino what functions like 'readSensor' mean and what to do. Usually when you get errors like that it means it's not finding the code that defines those functions, and usually either you didn't #include "file.h" or the file is not where the compiler knows to look for it.

Hope this helps, I was beating my head with that naught but a couple weeks ago, and a programmer friend helped me out.
#5791
Thanks Stanley and Mighty.  I was using MicroChip's MPIDE and ran in to compatibility issues.  I switched to the Arduino and it compiled fine. The problem I am having now is that the code is to big for a Nano.  Do you have a version of OBDlogger without the GPS code?
  • 1
  • 2
  • 3
  • 4
  • 5
  • 9