def find_microbit(): """ Returns the port for the first micro:bit found connected to the computer. """ for port in comports(): if port.vid == MICROBIT_VID and port.pid == MICROBIT_PID: return port.device