Upload Mode Broadcast

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

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

Let's use mBot to perform the Upload Mode Broadcast function.

Connect mBot

Use a USB data cable to connect mBot to your computer. Click the Devices tab and click + to add mBot from Device Library.

Set the mode to Upload.

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

Use "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. In the Extension center dialog box that appears, click + Add at the bottom of Upload Mode Broadcast.

(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.

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.

(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.

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

(6) Click the green flag under the stage and see what happens.

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

results matching ""

    No results matching ""