I am trying to assemble a string of a few different variables to send from one uC to another. This is what i coded.
msg.msgHeader = 'S';
msg.star = '*';
msg.data = distance_moved;
msg.data = voltage;
msg.data = current;
char * p = &msg;
for (int i = 0; i < sizeof(msg) - 2; i++)
msg.CS ^= p*;*
This will not compile in the IDE. I get "cannot convert '' to 'char' in initialization"
on this line : char * p = &msg;
Does anyone have any suggestions on how i go about achieving this? How do you send data between uControllers?