Serial communication with promises

Please open the developer console. Note that this example only works with a connected serial device with the Kontrast HTTP server and with a configuration that is equal to the one described in the serial documentation.

This example opens a serial device for communication and sends a command string to the device. The response of the device is read and written to the console. This request-response communication is repeated three times. Afterwards, the serial device is closed.

The example requires the file /utilities/serial.js from the standalone distribution for the setupSerial convenience function.

This example uses promises with the async/await syntax and async iterators.