title: Send carriage return
body: <p>I'm trying to connect through serial <a href="https://github.com/LLK/scratchx/wiki" rel="nofollow noreferrer">Scratchx</a> and a piece of hardware similar to Arduino.</p>
  
  <p>Scratchx lets you send data in JS this way:</p>
  
  <pre><code>var pingCmd = new Uint8Array(1);
  pingCmd[0] = 1;
  device.send(pingCmd.buffer);
  </code></pre>
  
  <p>Problem is the hardware firmware expects a string terminated with a carriage return, not an array buffer.</p>
  
  <p>Can you imagine a way to send this carriage return? I'm giving up, but... any idea is appreciated.</p>