I\'m currently working with Arduino Unos, 9DOFs, and XBees, and I was trying to create a struct that could be sent over serial, byte by byte, and then re-constructed into a stru
You do things in the wrong order, the expression
&struct_data+i
takes the address of struct_data and increases it by i times the size of the structure.
Try this instead:
*((char *) &struct_data + i)
This converts the address of struct_data to a char * and then adds the index, and then uses the dereference operator (unary *) to get the "char" at that address.