stanleyhuangyc / ArduinoOBD

OBD-II library and sketches for Arduino
http://freematics.com
973 stars 518 forks source link

Compatible with Arduino IDE 1.0.5? #5

Closed evanstoddard closed 10 years ago

evanstoddard commented 10 years ago

I get a lot of compilation errors. I know how to import libraries and have built several myself but I'm getting a lot of errors with this one and I'm wondering if it is not compatible with my current IDE. I am on Mac OS 10.9.2 with IDE 1.0.5. Here is the log of the latest attempt at compilation: In file included from sketch_mar06a.ino:2: /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:61: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:64: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:65: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:66: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:67: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:68: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:69: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:70: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:71: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:73: error: 'getResponse' declared as a 'virtual' field /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:73: error: expected ';' before '(' token /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:74: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:82: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:83: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h: In constructor 'COBD::COBD()': /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:58: error: class 'COBD' does not have any field named 'dataMode' /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:58: error: class 'COBD' does not have any field named 'errors' /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:58: error: class 'COBD' does not have any field named 'm_state' /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h: At global scope: /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:144: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:146: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:149: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:152: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:155: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:155: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:156: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:156: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:161: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:161: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:161: error: 'byte' has not been declared /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:162: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:163: error: 'byte' does not name a type /Users/evanstoddard/Documents/Arduino/libraries/OBD/OBD.h:165: error: 'byte' does not name a type

evanstoddard commented 10 years ago

Figured it out. Please add to your documentation that #include <Arduino.h> needs to be present in the sketch.