• Sorry, it looks like that's not implemented in UART.js, however you could look at using the Puck.js library which is very similar.

    In it there is a connection.reconnect method which should do what you need:
    https://github.com/espruino/EspruinoWebT­ools/blob/master/puck.js#L236

    So you may not even have to change the file, you can do connection = Puck.connect() to get the connection, then connection.device.addEventListener... and connection.reconnect()

About

Avatar for Gordon @Gordon started