[Resolved] How to have an Arduino wait until it receives data over serial?

Use Serial.available() for the tester of the while loop

while(Serial.available() <= 0){}