With the Upload Mode Broadcast extension, you can enable a sprite to interact with a device in Upload mode.
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.
1. Use a USB cable to connect mBot to your computer.
2. Click the Devices tab and click + add 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.
Use the Upload Mode Broadcast blocks
Let's create a new project to light up the LED indicators of mBot through 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.
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.
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 color ( ) 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.