title: Arduino Yún Bridge: simple command failing
body: <p>I created the following sketch, based almost entirely on the <a href="http://arduino.cc/en/Tutorial/Bridge" rel="nofollow">Bridge tutorial provided on arduino.cc</a>.</p>
  
  <p>I can't figure out why the example Bridge script has worked for me (toggling the LED on pin 13 by curling URIs like <code>arduino.local/arduino/digital/13/1</code>), but this much simpler sketch responds with my failure string, "Unrecognized command: hello" when I curl <code>arduino.local/arduino/hello/</code>.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>#include &lt;Bridge.h&gt;
  #include &lt;YunServer.h&gt;
  #include &lt;YunClient.h&gt;
  
  YunServer server;
  
  void setup() {
    Serial.begin(9600);
  
    // Bridge startup
    pinMode(13,OUTPUT);
    digitalWrite(13, HIGH);
    Bridge.begin();
    digitalWrite(13, LOW);
    server.begin();
  }
  
  void loop() {
    // Get clients coming from server
    YunClient client = server.accept();
  
    // There is a new client?
    if (client) {
      // Process request
      process(client);
  
      // Close connection and free resources.
      client.stop();
    }
  
    delay(50); // Poll every 50ms
  }
  
  void process(YunClient client) {
    // read the command
    String command = client.readStringUntil('/');
  
    if (command == "hello") {
      client.println(F("I will do your bidding"));
      return;
    }
  
    client.print(F("Unrecognized command: "));
    client.println(command);
  }
  </code></pre>
  
  <p>Ultimately, I'd like to use a longer, random string as a key--in place of "hello"--allowing me to activate a connected component from a device that has stored the secret (e.g. an smart phone with the URI stored as a button on the home screen).  </p>