#5836
Hi,

I have OBD II adapter and Ardinou UNO. I tried to test the OBD adapter, I put the OBD library in the library directory, when I complie the code I get this errors:

[code]In file included from OBD.ino:1:
OBD.h:53: error: 'byte' has not been declared
OBD.h:56: error: 'byte' has not been declared
OBD.h:57: error: 'byte' has not been declared
OBD.h:58: error: 'byte' does not name a type
OBD.h:59: error: 'byte' does not name a type
OBD.h:60: error: 'byte' does not name a type
OBD.h:61: error: 'byte' does not name a type
OBD.h:62: error: 'byte' does not name a type
OBD.h:64: error: 'getResponse' declared as a 'virtual' field
OBD.h:64: error: expected ';' before '(' token
OBD.h:65: error: 'byte' has not been declared
OBD.h:66: error: 'byte' does not name a type
OBD.h:73: error: 'byte' has not been declared
OBD.h:74: error: 'byte' does not name a type
OBD.h:76: error: 'uint8_t' does not name a type
OBD.h:80: error: 'uint16_t' does not name a type
OBD.h:84: error: 'uint8_t' does not name a type
OBD.h:88: error: 'int16_t' does not name a type
C:\Users\net\Documents\Arduino\libraries\OBD/OBD.h: In constructor 'COBD::COBD()':
OBD.h:50: error: class 'COBD' does not have any field named 'dataMode'
OBD.h:50: error: class 'COBD' does not have any field named 'errors'
OBD.h:50: error: class 'COBD' does not have any field named 'm_state'
C:\Users\net\Documents\Arduino\libraries\OBD/OBD.h: At global scope:
OBD.h:106: error: 'uint32_t' does not name a type
OBD.h:107: error: 'uint16_t' does not name a type
OBD.h:112: error: 'uint16_t' does not name a type
OBD.h:113: error: 'uint8_t' does not name a type
OBD.h:114: error: 'uint8_t' does not name a type
OBD.h:119: error: 'byte' has not been declared
OBD.h:121: error: 'byte' has not been declared
OBD.h:124: error: 'uint16_t' has not been declared
OBD.h:125: error: 'byte' has not been declared
OBD.h:125: error: 'byte' has not been declared
OBD.h:126: error: 'byte' has not been declared
OBD.h:126: error: 'byte' has not been declared
OBD.h:128: error: 'byte' has not been declared
OBD.h:128: error: 'uint8_t' has not been declared
OBD.h:128: error: 'byte' has not been declared
OBD.h:128: error: 'byte' has not been declared
OBD.h:129: error: 'byte' does not name a type
OBD.h:130: error: 'byte' does not name a type
In file included from rpm_led_i2c.ino:9:
OBD.h:47: error: redefinition of 'class COBD'
OBD.h:48: error: previous definition of 'class COBD'
OBD.h:109: error: conflicting declaration 'typedef struct PID_INFO PID_INFO'
OBD.h:109: error: 'PID_INFO' has a previous declaration as 'typedef struct PID_INFO PID_INFO'
OBD.h:115: error: conflicting declaration 'typedef struct COMMAND_BLOCK COMMAND_BLOCK'
OBD.h:115: error: 'COMMAND_BLOCK' has a previous declaration as 'typedef struct COMMAND_BLOCK COMMAND_BLOCK'
OBD.h:117: error: redefinition of 'class COBDI2C'
OBD.h:117: error: previous definition of 'class COBDI2C'
rpm_led_i2c:11: error: conflicting declaration 'COBDI2C obd'
OBD:5: error: 'obd' has a previous declaration as 'COBD obd'
rpm_led_i2c.ino: In function 'void setup()':
rpm_led_i2c:13: error: redefinition of 'void setup()'
OBD:7: error: 'void setup()' previously defined here
rpm_led_i2c.ino: In function 'void loop()':
rpm_led_i2c:23: error: redefinition of 'void loop()'
OBD:23: error: 'void loop()' previously defined here[/code]

How to solve this problem?

thank you
#5840
hello. I bought this OBD adapter (model b)couple days ago. I believe it's on its way to my home. before it gets here. I have a question.

I have a delegated MPU6050 (GY-521) which has a INT port on it. I connected this port to D2 port to my UNO 3. so I can use interrupt read. but I did not find any information of this port on this OBD adapter.

can you give me some clue? thanks!
#5846
Hi, @stanleyhuang

How much current while the adapter consumed when it is idle ?

Or, is there any way to put the adapter into power-saving mode. Since I don't what to plug/unplug the adapter every time when i start/stopped the engine, otherwise the battery may drained out if I park the car for a few days or weeks.

Thanks in advance.
#5847
With the power consumption issues while the car if off and the fact that it seems I must always plug in my adapter after the ignition is ON - is it possible to rewire the adapter so it receives power from the arduino 5V pin rather then supply it?

this way the arduino could be wired to a switched 12V circuit and the kit would automatically have its power cut when the ignition is OFF, and automatically first establish communications when the ignition is ON
#5849
[quote="mafbass"]
Hi Stanley, I have your OBD2 interface and would be interested in getting trouble codes (like P0172, etc.) and reset the trouble codes and MIL light. Can it be made available in the library?
Thank you!
[/quote]

As soon as there is code available in the library to check engine codes (CEL codes and such) and turn of the CEL, this adapter would be perfect for my project, and I'll buy one. I hope it becomes available soon!

Thanks!
#5850
I cannot get any of the code to verify, even the RPM Led UART example...  I use IDE 1.0.3 and 1.5.5, both have same errors..  Any suggestions?    I made sure OBD.cpp and OBD.h are included...    thanks


OBD.cpp: In member function 'void COBDI2C::begin(byte)':
OBD.cpp:333: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'virtual void COBDI2C::write(char*)':
OBD.cpp:369: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::sendCommand(byte, uint8_t, byte*, byte)':
OBD.cpp:378: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'virtual byte COBDI2C::receive(char*)':
OBD.cpp:390: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::btReceive(byte*, byte)':
OBD.cpp:429: error: 'Wire' was not declared in this scope
OBD.cpp: In member function 'bool COBDI2C::gpsQuery(GPS_DATA*)':
OBD.cpp:438: error: 'Wire' was not declared in this scope
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
  • 9