You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Good enough :)

    Ok, it looks like you don't need anything fancy at all. Just use the standard hardware serial.

    • Find a USARTx_TX pin on your board's pinout page (linked from here): http://www.espruino.com/Reference#boards­
    • If it was USART1, do something like:

      Serial1.setup(19200,{tx:TX_ENABLE_PIN});­
      
      function sendData(data) {
      digitalPulse(TX_ENABLE_PIN,1, (data.length+1)*10/19200);
      Serial1.write(data);
        
      }
      
      sendData([0x80,0x87,0xFF,0x7F,0x7F,0x7F,­0x7F,0x7F,0x7F,0x7F,0x8F]);
      

    That should all work ok - it's a bit fiddly because you have to set the TX enable pin on RS485, but not the end of the world.

About

Avatar for Gordon @Gordon started