Send carriage return

347 views Asked by At

I'm trying to connect through serial Scratchx and a piece of hardware similar to Arduino.

Scratchx lets you send data in JS this way:

var pingCmd = new Uint8Array(1);
pingCmd[0] = 1;
device.send(pingCmd.buffer);

Problem is the hardware firmware expects a string terminated with a carriage return, not an array buffer.

Can you imagine a way to send this carriage return? I'm giving up, but... any idea is appreciated.

0

There are 0 answers