Xbee

And in the second sketch,

  if (Serial.read() == "D")

should be

  if (Serial.read() == 'D')

??