A Low Cost Approach to Graphical Waterfall

This time i am making proper hardware and hope it will be success. I just completed 16valves electronics controller for solenoids. These modules will be added as solenoid valve increases.

I just need help in above posted arduino code. I want to make a communication protocol so that no waste byte affect the overall design.
Lets say The computer program send
X Byte Z
First byte is "X" this means data coming. Get the BYTE and check "Z" this mean the data end.
Now see next Byte.....
next,,....
Anybody help?