arduino serial read write structure

Solutions on MaxInterview for arduino serial read write structure by the best coders in the world

showing results for - "arduino serial read write structure"
Riccardo
09 Nov 2016
1void send (const structTable* table)
2{
3    Serial.write((const char*)table, sizeof(structTable));  // 2 bytes.
4}
5
6bool receive(structTable* table)
7{
8    return (Serial.readBytes((char*)table, sizeof(structTable)) == sizeof(structTable));
9}
10