I using arduino uno - seed can shield to send data to my CAN.
{
unsigned char stmp0[14] = {current_I1, Temp1, Temp2, Voltage_U1, Voltage_U2, Current_I1_red, OCP_flag, OVP_flag, UVP_flag};
byte sndStat0 = CAN0.sendMsgBuf(txID0, 0, lenTx0, stmp0);
if(sndStat0 == CAN_OK){
Serial.println("Message Sent Successfully!");
} else {
Serial.println("Error Sending Message...");
}
using this example from the can library. My question is, I want to use my 64bit length of the CAN message to the fullest as i want to send 14 data items .Since only for some of it i need 8 bits and for the rest it just need to be high or low (i.e 1 or 0 ) is there a way that i can send all of this in one message?
Since my message is a unsigned char array will it allow for some of my elements to be of a different data type
i have attached my full code too
Thanks in advance for your help
test_run.ino (4.34 KB)