Skip to content

Commit

Permalink
updated docs on binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Nov 15, 2023
1 parent d9ff822 commit 54e999d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Binary file removed docs/imagesForWeb.pptx
Binary file not shown.
2 changes: 1 addition & 1 deletion pxt-jacdac
Submodule pxt-jacdac updated 98 files
+1 −1 accelerometer-server/pxt.json
+1 −1 accelerometer/pxt.json
+1 −1 acidity/pxt.json
+1 −1 air-pressure/pxt.json
+1 −1 air-quality-index/pxt.json
+1 −1 arcade-gamepad/pxt.json
+1 −1 azure-iot-hub-health-server/pxt.json
+1 −1 azure-iot-hub-health/pxt.json
+1 −1 bluetooth-transport/pxt.json
+1 −1 braille-display/pxt.json
+1 −1 button-server/pxt.json
+1 −1 button/pxt.json
+1 −1 buzzer-server/pxt.json
+1 −1 buzzer/pxt.json
+1 −1 character-screen/pxt.json
+1 −1 cloud-adapter/pxt.json
+1 −1 codal-message-bus-server/pxt.json
+1 −1 codal-message-bus/pxt.json
+1 −1 color/pxt.json
+1 −1 compass/pxt.json
+1 −1 controller/pxt.json
+1 −1 dc-current-measurement/pxt.json
+1 −1 dc-voltage-measurement/pxt.json
+1 −1 devices/microbit/pxt.json
+1 −1 distance/pxt.json
+1 −1 dmx/pxt.json
+1 −1 dot-matrix/pxt.json
+1 −1 dual-motors/pxt.json
+1 −1 e-co2/pxt.json
+1 −1 flex/pxt.json
+1 −1 gamepad/pxt.json
+1 −1 gyroscope/pxt.json
+1 −1 heart-rate/pxt.json
+1 −1 hid-joystick-server/pxt.json
+1 −1 hid-joystick/pxt.json
+1 −1 hid-keyboard-server/pxt.json
+1 −1 hid-keyboard/pxt.json
+1 −1 hid-mouse-server/pxt.json
+1 −1 hid-mouse/pxt.json
+1 −1 humidity/pxt.json
+1 −1 illuminance/pxt.json
+1 −1 led-server/pxt.json
+1 −1 led-single/pxt.json
+1 −1 led-strip/pxt.json
+1 −1 led/pxt.json
+1 −1 light-bulb/pxt.json
+1 −1 light-level/pxt.json
+1 −1 magnetic-field-level/pxt.json
+1 −1 magnetometer/pxt.json
+1 −1 model-runner/pxt.json
+1 −1 motion/pxt.json
+1 −1 motor/pxt.json
+1 −1 multitouch/pxt.json
+1 −1 planar-position/pxt.json
+1 −1 potentiometer/pxt.json
+1 −1 pulse-oximeter/pxt.json
+1 −1 pxt.json
+1 −1 rain-gauge/pxt.json
+1 −1 real-time-clock/pxt.json
+1 −1 reflected-light/pxt.json
+1 −1 relay/pxt.json
+1 −1 rng/pxt.json
+1 −1 rotary-encoder/pxt.json
+9 −5 routing.ts
+1 −1 sat-nav/pxt.json
+1 −1 sensor-aggregator/pxt.json
+1 −1 servers/pxt.json
+1 −1 servo-server/pxt.json
+1 −1 servo/pxt.json
+1 −1 seven-segment-display/pxt.json
+1 −1 soil-moisture/pxt.json
+1 −1 solenoid/pxt.json
+1 −1 sound-level/pxt.json
+1 −1 speech-synthesis/pxt.json
+1 −1 switch/pxt.json
+1 −1 tcp/pxt.json
+1 −1 temperature/pxt.json
+1 −1 tools/dongle/pxt.json
+1 −1 tools/farm-beats/pxt.json
+1 −1 tools/hid-events/pxt.json
+1 −1 tools/hid-joystick/pxt.json
+1 −1 tools/hid-servers/pxt.json
+1 −1 tools/microbit-jukebox/pxt.json
+1 −1 tools/microbit-microcode-servers/pxt.json
+1 −1 tools/microbit-oob/pxt.json
+1 −1 tools/multitool/pxt.json
+1 −1 tools/uploader/pxt.json
+1 −1 traffic-light/pxt.json
+1 −1 tvoc/pxt.json
+1 −1 uv-index/pxt.json
+1 −1 version.ts
+1 −1 vibration-motor/pxt.json
+1 −1 water-level/pxt.json
+1 −1 weight-scale/pxt.json
+1 −1 wifi-server/pxt.json
+1 −1 wifi/pxt.json
+1 −1 wind-direction/pxt.json
+1 −1 wind-speed/pxt.json
14 changes: 14 additions & 0 deletions src/pages/clients/makecode/user-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ The micro:bit in dongle mode does not execute the user's program.
In pxt-jacdac v1.8.41 and earlier, the dongle behaved a bit differently where both physical and simulated device could become dongle.
The new behavior is designed to provide a better user experience.

## Client role binding

You can provide hints in the client role name in the form of URL query arguments to influence the binding algorithm:

```sts
export const btnB = new modules.ButtonClient("A?dev=self&srvo=1")
```

Supported arguments are:

- `dev=[id]` where `[id]` is the full device id or shortid. `self` is a special name that refers to the micro:bit device itself, it is used for servers.
- `srvi=[index]` where `[index]` is the service index
- `srvo=[index]` where `[index]` is the service offset, an index that only takes into account services of the same type.

## Multiple Roles

When running your code, Jacdac binds the modules detected on the bus with the **roles** defined in your program.
Expand Down

0 comments on commit 54e999d

Please sign in to comment.