- Wed Dec 11, 2013 8:25 am
#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
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