BBC Micro:Bit : possible to detect WebUSB?

58 views Asked by At

I'm got a BBC Micro:Bit 2.21 and I'm writing code using micropython on https://python.microbit.org/ .

I have tried to find a way to know if the Micro:Bit is connected to a browser using WebUSB or to something else using a normal USB connection but I haven't found any way.

The reason for this is that the WebUSB serial prompt in Chrome looks better when outputting strings with \r\n but my program normally uses \n when communicating with a Raspberry Pi.

Is there a way to detect if the Micro:Bit is connected using WebUSB or not?

0

There are 0 answers