Runtime — Supervisor Runtime information

Get current status of runtime objects.


import supervisor
if supervisor.runtime.serial_connected:
    print("Hello World!")
class supervisor.Runtime

You cannot create an instance of supervisor.Runtime. Use supervisor.runtime to access the sole instance available.


Returns the USB serial communication status (read-only).


Returns the whether any bytes are available to read on the USB serial input. Allows for polling to see whether to call the built-in input() or wait. (read-only)


SAMD: Will return True if the USB serial connection has been established at any point. Will not reset if USB is disconnected but power remains (e.g. battery connected)

Feather52 (nRF52832): Currently returns True regardless of USB connection status.