respond_to_command: ' Check for defined commands. if (received_text[0] = "L") AND (received_text[1] = "1") then ' The command begins with "L1". select case received_text[2] case "1" ' Turn on the LED. high PORTB.1 ' Send a response ending in a LF. hserout ["1",10] case "0" ' Turn off the LED. low PORTB.1 ' Send a response ending in a LF. hserout ["0",10]  case else end select endif return Listing 3. The device responds to two commands.