Notice the
Yeah, I did. But, as has been pointed out, Serial.available() does not return a boolean saying that there is, or is not data to be read. So, that statement REALLY should be:
while(Serial.available() == 0); // Do nothing while there is nothing to read.
Then, it is crystal clear what is meant and what will happen.
I'm not real sure what's going on here...
Probably because that code is crap. The loop() function is called in an infinite loop. There is no reason to add an infinite loop inside it.
The loop() function should have a while(Serial.available() > 0) block, that handles all incoming serial data.
Inside that block, it should read and possibly store data. After reading an available character, it should decide whether it is a start marker. If not, and two start markers have not been received, ignore it.
If it is, it should increment the count of start markers.
If it is not a start marker and two start markers have arrived, then it should store the data in the next array, based on how many bytes have been read since the second start marker arrived.
Obviously, dealing with the end markers has to happen, too.
But, if it works, you don't have to make it better.
What data, exactly, do you want to send by radio? And, when? One byte at a time? Three bytes at a time? All n bytes for all p LEDs?