microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 26 forks source link

How to map devices in device tree to pxt-jacdac packages? #797

Open jamesadevine opened 3 years ago

jamesadevine commented 3 years ago

It's unclear how devices in the device tree map to service clients in pxt-jacdac. This is problematic if you are using mkc and visual studio code to write programs for makecode + jacdac.

pelikhan commented 3 years ago

We released yesterday that ability to run a simulator from vscode.

Upgrade mic and use "mic serve" + jacdac dev tools

Maybe that helps

tballmsft commented 3 years ago

yeah, we could use a little tool support here, but essentially the pattern is:

pelikhan commented 3 years ago

you can do mkc add jacdac-joystick already

can we have more details about this?

pelikhan commented 3 years ago

the role === makecode client name, which is shown in the dashboard device. but that does not seem to be obvious

tballmsft commented 3 years ago

Where to put the details?

pelikhan commented 3 years ago

Add to this bug

jamesadevine commented 3 years ago

you can do mkc add jacdac-joystick already

can we have more details about this?

Right, that's fine if you know joystick maps to "jacdac-joystick" in pxt-jacdac. The issue is, for someone who isn't us and is using mkc + visual studio, how do they work out what packages to specify in the mkc add command

jamesadevine commented 3 years ago

It would be cool for the mkc command to auto detect modules, but i understand there are dragons with usb via node...

jamesadevine commented 3 years ago

sample output?

mkc jdls
-> rotary -> jacdac-rotary
-> button -> jacdac-button
-> joystick -> jacdac-joystick
Auto install? [y/n]
pelikhan commented 3 years ago

the mkc command prompt currently does not do USB;

pelikhan commented 3 years ago

we should extend search to also return jacdac sub-repoes. the cloud search does not support mono-repoes

tballmsft commented 2 years ago

@pelikhan - does this need to be documented somewhere?

pelikhan commented 2 years ago

it should go here https://microsoft.github.io/jacdac-docs/clients/makecode/code/