You are reading a single comment by @Mrbbp and its replies. Click here to read the full conversation.
  • 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?

About

Avatar for Mrbbp @Mrbbp started