My project reads data from a Can_Bus with the MCP2515 board. I have used other’s libraries to read the messages which are stored in an array/struct. I can read and print the message ID and the data payload, but the ID is a 4byte variable (unsigned long 32) which contains hex info from the full ID. I want to extract the 2nd and 3rd bytes for further processing and ignore the 1st and 4th.
e.g. if the message data is 8DF50B73
I want to extract F50B for further processing.
Can someone advise what functions I can use for this process?
Please be gentle, I am in-experienced with C/C++. My previous coding many years ago was in Basic!
Thanks in anticipation.