I bought the R4 Minima so that I could use it in a project for my track car where I want to display certain data from the vehicle CAN onto an OLED screen, and also use it to drive an air-core gauge.
First problem I have is that the Adafruit OLED that I have bought works in SPI on my R3 but doesn't work on my R4... but I'll ignore that issue for now.
I have used an MCP2551 CAN transceiver which I have connected as per below -
...and used the CAN read sketch from this example -
Set my rate to 500k (which I know for fact is the rate for my car), connected it up to the CAN network and nothing is printing to the Serial Monitor.
I'm a beginner at best so I've just been searching everywhere online for anything that might give me a clue as to what could be going wrong. I don't know if perhaps I'm being naïve in thinking I could use that sketch to read the CAN stream (although with it being a standard protocol, I would have expected it to know what it's looking for?).
This thread here seems to suggest that at the moment CAN is only operating with 29 bit IDs... Is that correct? If so I wonder if that could be my problem as I know for certain that my car uses 11-bit IDs.
This below seems to suggest that 11-bit is being added? Am I understanding that correctly? Reading through it I don't understand half of what is being discussed....
That is correct. The work was completed earlier today. However, there hasn't been a release of the "Arduino UNO R4 Boards" platform since that time so you'll have to wait until the next release comes out before the 11-bit support will be available to the users of the release version of the platform.
Just tagging this on the end here - not sure if it might be better to post this as a new question somewhere else, but I don't know where on the forum it should go?
In my CAN stream I have about 15 unique IDs but I am only interested in 2 or 3 of them.
Is it possible to filter what gets written to the temp buffer based on the IDs?
I assume that it would be significantly lighter work on the hardware to only write the stuff that is wanted to memory rather than every single message.