askvity

How to Connect Scratch to Lego Boost?

Published in LEGO Boost Programming 3 mins read

To connect Scratch to LEGO Boost, you need to install Scratch Link, ensure Bluetooth is enabled on your computer, and load the LEGO Boost extension within Scratch.

Connecting your LEGO Boost creations with Scratch allows for interactive programming beyond the standard Boost app. This integration enables you to control your models and read sensor data using the familiar Scratch block-based programming environment.

Essential Steps for Connecting LEGO Boost and Scratch

Successfully linking your LEGO Boost Hub with Scratch involves a few key technical steps to establish communication between your computer and the Boost hardware.

Step 1: Install and Run Scratch Link

The first requirement is a piece of software called Scratch Link. This application acts as a bridge between the web-based or desktop Scratch editor and Bluetooth-enabled devices like LEGO Boost.

  • Visit the official Scratch website to download Scratch Link for your operating system (Windows or macOS).
  • Install the application following the on-screen instructions.
  • Ensure Scratch Link is running in the background before attempting to connect your Boost hub. It typically appears as an icon in your system tray or menu bar.

Step 2: Turn On Bluetooth on Your Computer

LEGO Boost communicates wirelessly using Bluetooth Low Energy (BLE). Therefore, Bluetooth must be active on the computer you are using to run Scratch.

  • Locate the Bluetooth settings on your computer (usually found in the system settings or control panel).
  • Turn the Bluetooth radio on.
  • Make sure your computer's Bluetooth is discoverable or ready to pair with new devices, although direct pairing through system settings is not usually required for Scratch Link connections.

Step 3: Load the Boost Extension in Scratch

Once Scratch Link is running and Bluetooth is active, you need to add the LEGO Boost programming blocks to your Scratch project.

  • Open Scratch (either the online editor at scratch.mit.edu or the desktop app).
  • In the bottom-left corner of the Scratch editor, click the Add Extension button (a blue button with two blocks and a plus sign).
  • Find and select the LEGO BOOST extension from the list of available extensions.

After selecting the extension, Scratch will attempt to find and connect to nearby LEGO Boost hubs via Scratch Link and Bluetooth. Ensure your Boost hub is powered on and within range. A successful connection will be indicated within the extension block area in Scratch.

Using LEGO Boost with Scratch

Once connected, you can drag and drop specific blocks related to the LEGO Boost hub and its sensors/motors into your Scratch programming area. According to the reference, you can utilize the following components:

  • Motors: Control the rotation and power of the connected motors (often the built-in motors on the hub or external motors).
  • Tilt Angle Sensors: Read the orientation of the hub in different directions.
  • Color Sensor: Detect colors or the proximity of objects.

By combining these dedicated Boost blocks with standard Scratch programming concepts (loops, conditionals, events), you can create complex behaviors and interactions for your LEGO Boost models.

Related Articles