With the Upload Mode Broadcast extension, you can enable a sprite to interact with a device in Upload mode.

:::info Note:
In the default settings, you can enable a sprite to interact with a device only in Live mode after connecting the device to your computer through a serial port. :::

Let’s use mBot as an example to explore the Upload Mode Broadcast extension.

Connect mBot

(1) Use a USB data cable to connect mBot to your computer.

(2) Click the Devices tab and click + to add mBot from Device Library.

(3) Set the mode to Upload.

(4) Click Connect. In the dialog box that appears, choose USB and click Connect.

Upload Mode Broadcast - 图1

Use the Upload Mode Broadcast blocks

Let’s create a new project to light up the LED indicators of mBot through Panda.

Program Panda

(1) Click the Sprites tab and click + extension at the bottom of the blocks area. On the Extension center page that appears, click + Add at the bottom of Upload Mode Broadcast.

Upload Mode Broadcast - 图2

(2) Select Panda. Drag the Events block when green flag clicked and Upload Mode Broadcast block send upload mode message ( ) to the scripts area, and name the message light.

Upload Mode Broadcast - 图3

Program mBot

(3) Select mBot on the Devices tab and click + extension at the bottom of the blocks area. In the Extension center dialog box that appears, click + Add at the bottom of Upload Mode Broadcast.

Upload Mode Broadcast - 图4

(4) Drag the Upload Mode Broadcast block when receiving upload mode message ( ) to the scripts area and enter the message name light. Drag the Show block LED (all) shows ( ) to the scripts area, and keep the default red color.

Upload Mode Broadcast - 图5

(5) Click Upload to upload the program to mBot.

Upload Mode Broadcast - 图6

(6) Click the green flag under the stage and see what happens.
upload-mode-6.gif

Upload Mode Broadcast - 图8