Sorry it does not work
there is no callback on serial therefor you pulse on the TX_ENABLE_PIN ok.
but initiate the serial with the TX pin ...
i've tried this
var TX_ENABLE_PIN = A8;
var TX_PIN = B6;
function sendData(data) {
digitalPulse(TX_ENABLE_PIN,1, (data.length+1)*10/19200);
Serial1.write(data);
console.log("envoie data", data.toString());
}
function onInit() {
Serial1.setup(19200,{tx:TX_PIN});
setInterval(sendData, 2000, [0x80,0x87,0xFF,0x01,0x01,0x01,0x01,0x7F,0x7F,0x7F,0x8F]);
}
is it good or i can't use serial1 with usb plugged?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Sorry it does not work
there is no callback on serial therefor you pulse on the TX_ENABLE_PIN ok.
but initiate the serial with the TX pin ...
i've tried this
is it good or i can't use serial1 with usb plugged?