longan-labs / canbeddual_arduino_lib Goto Github PK
View Code? Open in Web Editor NEWArduino Library for CANBed Dual
License: MIT License
Arduino Library for CANBed Dual
License: MIT License
The read will always request 8 bytes of data even if there are only 2 bytes in the canbus messages.
This completely messes up the read comunication after a 2 byte data data package
it is like this
if(dtaLen <= 32)
{
CANI2C.beginTransmission(0x41);
CANI2C.write(canNum ? 0x17 : 0x07);
CANI2C.endTransmission();
CANI2C.requestFrom(0x41, 8);
for(int i=0; i<8; i++)
{
str[i]= CANI2C.read();
}
}
and it needs to be
if(dtaLen <= 32)
{
CANI2C.beginTransmission(0x41);
CANI2C.write(canNum ? 0x17 : 0x07);
CANI2C.endTransmission();
CANI2C.requestFrom(0x41, dtaLen);
for(int i=0; i<dtaLen; i++)
{
str[i]= CANI2C.read();
}
}
After this change I could use the CANBED dual in my sprinter to sniff the internal CANBUS's. before this changes it was even starting to think that there were extended CAN message on the CANBUS. Please fix this in your code, I am not the only one having this problem.
Hi,
I have the following code:
Serial.println ("Reading 0");
if(CAN1.read (&id,&ext,&rtr,&fd,&len,dtaGet))
{
Serial.print ("0 ");
Serial.println (len);
}
Serial.println ("Reading 1");
It seems to hang if there is no data on the canbus - how can I avoid this please ?
Thanks !
Hi,
I just received my CANBedDual and I've been able to run a simple loop example.
Looking a bit more into this library, I noticed there is no source code available for the GD32E103 used as CAN controller.
Would it be possible to have it published under a FOSS licence as well?
Thanks
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.