togglebit / arduinodue_obd_freerunningcan Goto Github PK
View Code? Open in Web Editor NEWThese classes have been built with free-running CAN and OBDII data acq in mind
License: GNU Lesser General Public License v2.1
These classes have been built with free-running CAN and OBDII data acq in mind
License: GNU Lesser General Public License v2.1
I attempted with the library folder named CAN, can, and OBD2, all with the same result. It's almost as if it's not allowing the custom variant.h file to load...
Arduino: 1.6.8 (Windows 10), Board: "Arduino Due (Programming Port)"
In file included from C:\Users\Nathan\Documents\Arduino\libraries\OBD2/OBD2.h:18:0,
from C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino:1:
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:121:5: error: 'UINT32' does not name a type
UINT32 ID;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:132:9: error: 'UINT8' does not name a type
UINT8 b[8];
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:136:13: error: 'UINT32' does not name a type
UINT32 lowerPayload;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:137:13: error: 'UINT32' does not name a type
UINT32 upperPayload;
^
In file included from C:\Users\Nathan\Documents\Arduino\libraries\OBD2/OBD2.h:18:0,
from C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino:1:
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:239:5: error: 'UINT32' does not name a type
UINT32 getTimeSlice(bool max);
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:267:5: error: 'UINT32' does not name a type
UINT32 getTxCtr();
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:274:5: error: 'UINT32' does not name a type
UINT32 getRxCtr();
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:291:5: error: 'UINT32' does not name a type
UINT32 count, prevCount, ticks, usTicks;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:296:5: error: 'UINT16' does not name a type
UINT16 _1mSCntr, _10mSCntr, _100mSCntr, _200mSCntr, _1000mSCntr, _queryCntr;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:301:5: error: 'UINT32' does not name a type
UINT32 usTsliceEnd, usTslice, usTsliceMax;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:316:5: error: 'UINT8' does not name a type
UINT8 msgCntRx;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:317:5: error: 'UINT8' does not name a type
UINT8 msgCntTx;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:318:5: error: 'UINT8' does not name a type
UINT8 msgCntQuery;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:323:5: error: 'UINT8' does not name a type
UINT8 queryIndex;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:328:5: error: 'UINT32' does not name a type
UINT32 RxCtr;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:329:5: error: 'UINT32' does not name a type
UINT32 TxCtr;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:338:5: error: 'UINT32' does not name a type
UINT32 MAM_mask;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/CAN_Acquisition.h:339:5: error: 'UINT32' does not name a type
UINT32 MID_mask;
^
In file included from C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino:1:0:
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/OBD2.h:145:2: error: 'UINT32' does not name a type
UINT32 getIntData();
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2/OBD2.h:223:9: error: 'UINT8' does not name a type
static UINT8 listIdx;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino: In function 'void setup()':
CAN_BoardTest:36: error: 'class cCANFrame' has no member named 'ID'
RAW_CAN_Frame1.ID = 0x100;
^
CAN_BoardTest:38: error: 'class cCANFrame' has no member named 'ID'
RAW_CAN_Frame2.ID = 0x101;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino: At global scope:
CAN_BoardTest:56: error: 'UINT8' does not name a type
UINT8 i,CAN0_rxCtr,CAN1_rxCtr;
^
CAN_BoardTest:57: error: 'UINT32' does not name a type
UINT32 maxTime;
^
CAN_BoardTest:58: error: 'UINT8' does not name a type
UINT8 passFail;
^
C:\Users\Nathan\Documents\Arduino\libraries\OBD2\CAN_BoardTest\CAN_BoardTest.ino: In function 'void loop()':
CAN_BoardTest:63: error: 'passFail' was not declared in this scope
passFail = true;
^
CAN_BoardTest:66: error: 'CAN0_rxCtr' was not declared in this scope
if (CAN0_rxCtr != CANport0.getRxCtr())
^
CAN_BoardTest:66: error: 'class cAcquireCAN' has no member named 'getRxCtr'
if (CAN0_rxCtr != CANport0.getRxCtr())
^
CAN_BoardTest:77: error: 'CAN0_rxCtr' was not declared in this scope
CAN0_rxCtr = CANport0.getRxCtr();
^
CAN_BoardTest:77: error: 'class cAcquireCAN' has no member named 'getRxCtr'
CAN0_rxCtr = CANport0.getRxCtr();
^
CAN_BoardTest:80: error: 'CAN1_rxCtr' was not declared in this scope
if (CAN1_rxCtr != CANport1.getRxCtr())
^
CAN_BoardTest:80: error: 'class cAcquireCAN' has no member named 'getRxCtr'
if (CAN1_rxCtr != CANport1.getRxCtr())
^
CAN_BoardTest:91: error: 'CAN1_rxCtr' was not declared in this scope
CAN1_rxCtr = CANport1.getRxCtr();
^
CAN_BoardTest:91: error: 'class cAcquireCAN' has no member named 'getRxCtr'
CAN1_rxCtr = CANport1.getRxCtr();
^
exit status 1
'class cCANFrame' has no member named 'ID'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Hi, it seems the AUTOBAUD
setting is causing serious problems when using the TIMER_2mS
, but sooner or later also the POLLING
mode (if combined with a more complex processes). I spent many hours trying to find out why my sketch freezes, also the communication through SerialUSB port itself, and why I have to manually erase the controller to upload a new sketch. While the OBD_Example_3.ino
worked with the TIMER_2mS
mode, the standard OBD2_11bit_ID
example did not, when I modified it in the same way. Finally, I found out that the crucial difference is the use of AUTOBAUD
- if used in the OBD_Example_3.ino
, it freezes too. I suppose it requires too much time at every call - I thought it only detects the speed when the bus if first initialized.
Hello I would like to ask you if this code works with "sn65hvd230" CAN transciever and if so does that work on a Citroen or any french car manufacturer. Thanks in advance
Wondering how to get access to other modes? Specifically, looking for VIN, found at Mode 9: Request vehicle information.
According to Wikipedia, VIN is:
Mode 9
PID 02
Data bytes returned = 17-20
17-char VIN, ASCII-encoded and left-padded with null chars (0x00) if needed to.
Something like this in OBD2.h ?
enum OBD_PID
{
ENGINE_LOAD = 0x04,
COOLANT_TEMP = 0x05,
ENGINE_RPM = 0x0C,
SPEED = 0x0D,
ENGINE_IAT = 0x0F,
ENGINE_MAF = 0x10,
THROTTLE_POS = 0x11,
FUEL_FLOW = 0x5E,
VIN = 0x02
};
/**
*
* This enum represents the size of the OBD2 signal in bits (8,16,32) per OBD2 protocol
*/
enum OBD_PID_SIZE
{
_8BITS = 1,
_16BITS = 2,
_32BITS = 4,
_160BITS = 20
};
/**
*
* This enum represents the desired mode of the signal requested from the OBD2 port
*/
enum OBD_MODE_REQ
{
CURRENT = 1,
FREEZE = 2,
REQUEST = 9
};
and this line in the sketch:
cOBDParameter OBD_VIN( "VIN " , " #" , VIN , _160BITS, false , REQUEST, 1, 0, &CANport0, false);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.