Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add USB HID support #146

Open
dolmen opened this issue Sep 6, 2019 · 0 comments
Open

Add USB HID support #146

dolmen opened this issue Sep 6, 2019 · 0 comments

Comments

@dolmen
Copy link

dolmen commented Sep 6, 2019

Feature request

Add support for USB HID devices.

Use case: LEGO Dimensions Toypad extension

I would like to implement a Scratch 3.0 extension for the LEGO Dimensions Toypad created for the LEGO Dimensions console game. I want to give a second life to this hardware device that was created for a video game that is now abandoned by WB Games/LEGO. As this is an end-of-life product it is quite cheap device.

The LEGO Dimensions toypad PS3/PS4 is a USB HID device.

I have already a good understanding of the protocol between the toypad and a computer as I have implemented myself a Go library and tools to interact with the toypad. Some other implementations in JS already exist too.

So far documentation of Scratch 3.0 hardware extensions is quite lacking. The wiki seems to contain only documentation which is irrelevant to Scratch 3.0 (tell me if I'm wrong). I finally found this project.

To implement a LEGO Dimensions Toypad extension it looks like I need:

  • add USB HID support in scratch-link
  • create a JS extension in scratch-vm for the Toypad

I also wonder if implementing a USB HID / WebSocket+JSON-RPC 2.0 gateway that implements the scratch-link network protocol in Go (as this is my favorite programming language) as a scratch-link bypass would be a viable option to quickly prototype my extension (the JS part). But I have not yet found how Scratch connects to scratch-link (how does it finds IP, port?) and where the JS has to be installed to work with Scratch Desktop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant