import pyb pyb.usb_mode('VCP+HID') # act as a serial device and a mouse