Preferences


westurner
This makes an RP2040 Raspberry Pi Pico usable as a WebUSB 2x20 pin GPIO from JS or e.g. Python in WASM.

/q rp2040 "WebBluetooth"

awesome-web-serial lists a few RP2040-compatible things: https://github.com/louisfoster/awesome-web-serial

web-bluetooth-repl is a REPL over WebBluetooth with MicroPython devices that support Bluetooth: https://github.com/siliconwitchery/web-bluetooth-repl

Pybricks does MicroPython over WebBluetooth with a NextJS app.

westurner
Also, the Ryanteck RTk.GPIO (PC GPIO Interface) has USB and 2x20 pin GPIO: https://uk.pi-supply.com/collections/all-raspberry-pi-hats-a... :

> The RTk.GPIO is a Plug & Play USB Device which adds 28 x Raspberry Pi style GPIO pins to your computer

The Pi Pico RP2040 has one onboard LED on pin 25. The Pi Pico W (RP2040W) has an onboard LED but it's no longer connected to the 2x20 GPIO, so it's `machine.Pin("LED")` instead of `machine.Pin(25)`.

Wokwi has a WASM Pi Pico simulator.

turbocrime
i assumed webusb was entirely host-side, but apparently a device can provide a descriptor specifying a URI to the intended compatible page, and that seems to be one of the features of this PR.

https://developer.chrome.com/articles/build-for-webusb/#webu...

the rest of it seems a little strange. the webserial API should be able to talk to any class-compliant serial device, that's already supported.

https://developer.chrome.com/articles/serial/#open-port

the 0x22 request type isn't part of any webusb standard, it is from a tinyusb example program where they demo connecting webusb and webserial to the same device, which is a little strange and probably not what you're doing with the rp2040.

roywashere OP
I think it is super interesting to see that such a nice to have feature for such a big platform depends exclusively on a few individuals. I.e. there seems no-one from the Foundation driving this. I would have assumed there are at least one or two people there who would help out with this kind of stuff
jeroen79
How can it have WebUSB when the RP2040 doesn't have any wifi or network?
matthews2
WebUSB is about a web page communicating with USB devices. So the USB device itself doesn't need to be connected to the Internet, it just needs to be plugged into a PC with a web browser (Chrome).

This item has no comments currently.