Can a microbit detect a host computer
-
- Posts: 168
- Joined: Tue Nov 07, 2017 11:45 pm
Can a microbit detect a host computer
Is there a way to detetmine if a microbit is connected to a laptop via usb. Is there a micropython function the microbit can run to detect a usb host
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Can a microbit detect a host computer
I don't think so.
-
- Posts: 168
- Joined: Tue Nov 07, 2017 11:45 pm
Re: Can a microbit detect a host computer
I was looking at some pyboard docs. There is a function in the pyb version of micropython. I'm going to raise a feature request
Re: Can a microbit detect a host computer
I'm not aware that this would be possible to detect that USB is connected -- the USB functionality is handled by a separate chip on the micro:bit (which runs Daplink). The only pins connected between the NRF51822 (that runs your MicroPython code) is the TX/RX pair for the UART. [Ref: https://github.com/bbcmicrobit/hardware ... _V1.3B.pdf]
On the other hand, if you had something running on the host computer that detected the micro:bit then send it a message over the UART, that might work.
(Note that on the microbit, the single UART is also used by the REPL).
On the other hand, if you had something running on the host computer that detected the micro:bit then send it a message over the UART, that might work.
(Note that on the microbit, the single UART is also used by the REPL).