I need help with send and receiving serial!

How would i change the code i included for me to be able to send it “Turn Led On” instead of 1s or 0s?

Serial_test_led_on_and_off.ino (433 Bytes)

Before moving on to read more complicated input can you explain what this line does ?   while (Serial.available() == 0) Serial.read();To me it says "When there is nothing available on the serial input, read it. Does that make sense ?

Read this page for an explanation of how to read a series of bytes from serial and assemble them into a string (note, not a String) http://gammon.com.au/serial . Once the data is in a string it can be tested and actions taken based on it.