do its thing
  ...
}
</pre>

<p>The accessory must then check for a live USB connection to process commands and send
messages. Here is a summary of the relevant code:</p>

<pre>
void loop() {
  if (L.accessoryConnected()) {
    int recvLen = L.accessoryReceive(msg, sizeof(msg));
    if (recvLen > 0) {
      ... // process message
    }

    L.accessorySend(outmsg, outmsgLen);
  }
  L.adkEventProcess();
}
</pre>

<p>For more details, review the implementations of these methods in the <code>clock.ino</code>
s