Thanks to this sub I'm able to now read CAN data from my car. I'm using an Arduino Uno and an MCP2515 shield.
The data I'm getting is a stream of everything. What I'm trying to do now is filter that data. Here's a sample of my data as seen in Arduino's serial monitor:
09:42:25.202 -> ID: 156, Data: 80 0 0 0 0 0 0 17
09:42:25.240 -> ID: 156, Data: 80 0 0 0 0 0 0 17
09:42:25.273 -> ID: 156, Data: 80 0 0 0 0 0 0 17
09:42:25.307 -> ID: 284, Data: 881 3 0 8 0 0 0 0
I've been using Cory Fowlers Arduino code and samples: GitHub - coryjfowler/MCP_CAN_lib: MCP_CAN Library
I've been using this code to try and filer data: MCP_CAN_lib/Standard_MaskFilter.ino at master · coryjfowler/MCP_CAN_lib · GitHub
There's some preamble in that code that explains how to filter, but I frankly don't get it. I've tried a few things and everything I've done has resulted in everything being filtered.
So In the sample code above, how would I go about filtering all data from "156"? (or some other ID)
Ultimately I'd like to be able to filter out a list of IDs so I can use process of elimination to detect some devices on my CAN network.
I've been reading as much as I can find, stuff like this:
I apparently am missing something really basic... It's just not clicking with me. If someone can explain this in plan english I'd really really appreciate it!