franksmicro / arduino Goto Github PK
View Code? Open in Web Editor NEWRepository for sharing my open-source Arduino code
Repository for sharing my open-source Arduino code
Hi Frank,
We are starting a new Electric Car Motor project, and curious if you did any part time consulting, or would just like to be involved with us interfacing a Curtis Motor Controller ?
I'm trying to pick a good CAN shield to build a sniffer, and able to issue some write commands for starters. If that goes well, I think we will make a tablet infotainment interface to our CAN bus, to display valuable data from the controller.
I think you will like the project/vehicle we are building ...
Thanks,
-john
[email protected]
In Arduino 1.0, the name of the main library changed. To make your libs work again(but still keep compatibility to older versions), you'd want to change
to
#include "Arduino.h"
#include "WProgram.h"
I made these changes to use your MCP2515 lib and had no problem working with it afterwards.
Using the provided OBDMPG, I noticed that I was receiving speed data as maf data. What I saw was that the PID for the received data did not match the PID for the requested data. Adding a check to see if the PIDs matched fixed the problem.
This was my fix.
rxSuccess = receiveCANMessage(&msg,1000);
if (rxSuccess) {
//Check if the PIDs match
while(msg.data[2] != code){
rxSuccess = receiveCANMessage(&msg,1000);
noMatch++;
if (noMatch >= 5) {
return 0;
}
}
} else {
return 0;
}
What it does is check if data was received and if the PID matches. If not try again and see if it matches. Repeat 5 times before giving up. If it timesout once, give up.
Hello, is there an update soon?
Since the time the library was written, lot of things changed on Arduino side.
Thanks.
Sorry if this is an issue on my side, but in my testing whenever I would have the library send out an extended message, the ID that it would send out would not be correct.
If I sent 0x123 and have isExtendedAdrs set to LOW, it would send out 0x123. (as expected)
If I sent 0x123 and have isExtendedAdrs set to HIGH it would send out 0x48C0123.
If I sent 0xFFFFAB and have isExtendedAdrs set to HIGH it would send out 0x1EACFFAB.
I've tested this using a NI USB CAN device, and a neoVI Fire.
Receiving extended messages seems to work fine.
EDIT: The first issue I see with this is that register TXB0SIDL is leaving the extended ID bit 17, and bit 16 zero, even if the extended ID uses these bits. This is a bug, but even zeroing these out (which they will be right now) still sends a ID that is not correct.
The Keeloq library cannot compile, since it is no longer possible to #include <WProgram.h>
. You need to replace it by the more appropriate #include <Arduino.h>
.
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.