When using serial communication I almost always use string/ascii data with Robin's start and end markers function. This method has proved to be very reliable. Now I want to try and reduce the characters/bytes being transmitted and I am looking for techniques/methods of using bytes instead of asciii. At present I have no real need for this beyond doing it to learn.
What are preferred protocols and how would you go about labeling data to differentiate it while minimizing the amount of bytes used? As an example, I have several sensors and devices connected to an Arduino. Data from this Arduino is transmitted to a second Arduino for data logging. The data has identifying labels such as T for temperature, H for humidity, P for pressure, etc. and a typical data set would be [T1,025]. What methods and techniques can be employed to send the same values but using the minimum number of bytes while still being able to determine
1 - I can reliable find the start of a data set
2 - identify the sensor or what the data is
3 - the actual value.