Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Build and Code Creative Robots with LEGO BOOST

You're reading from   Build and Code Creative Robots with LEGO BOOST Unleash your creativity and imagination by building exciting robotics projects

Arrow left icon
Product type Paperback
Published in Nov 2021
Publisher Packt
ISBN-13 9781801075572
Length 428 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Ashwin Shah Ashwin Shah
Author Profile Icon Ashwin Shah
Ashwin Shah
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Chapter 1: Introduction to the LEGO BOOST Kit 2. Chapter 2: Building Your First BOOST Robot – Tabletop Fan FREE CHAPTER 3. Chapter 3: Moving Forward/Backward Without Wheels 4. Chapter 4: LEGO BOOST Rover 5. Chapter 5: Getting into Gear – My First Geared Robot 6. Chapter 6: Building a Forklift 7. Chapter 7: Building a Helicopter 8. Chapter 8: Building R2-D2 9. Chapter 9: Building an Automatic Entrance Door 10. Chapter 10: Building a Candy Dispenser Robot 11. Chapter 11: Building a Color-Sorter Conveyor Belt 12. Chapter 12: Building a BOOST Racing Car 13. Chapter 13: Final Challenge 14. Bonus Chapters
15. Chapter 14: The Grabbing Robot 16. Chapter 15: Obstacle Avoidance Robot 17. Chapter 16: The BOOST Humanoid 18. Chapter 17: The Moon Rover 19. Other Books You May Enjoy

Programming the tabletop fan

In this section, we will be coding the model we created using the LEGO BOOST kit. There are various ways you can code your BOOST:

  • The LEGO BOOST official app:

    a. It can only be used on mobile and tablets.

    b. Only the offline version is available.

    c. Only works on Android, Windows, and iOS devices.

    d. It has built-in building instructions for some of the coolest BOOST robots!

    Most of you will be first-time users of this app.

  • LEGO BOOST extension in the Scratch 3.0 programming language:

    a. It can be used on any device – mobile/tablet/laptop.

    b. It is available as an online as well as an offline version.

    c. It can be used on any OS – Chrome OS/MacOS/Windows/Linux.

    d. The building instructions can be easily and freely downloaded from LEGO Education's official website.

Most of you will have come across the Scratch programming language at least once!

Important Note

Scratch is a block-based programming language developed by MIT Media Labs, US. It is one of the most widely used programming languages by elementary school students across the globe, owing to its user-friendly interface, easy-to-understand programming blocks, and flexibility to connect to various platforms such as BOOST, WeDo, EV3, Arduino, micro:bit, and so on.

Considering these pointers, we shall be using the Scratch 3.0 offline/online editor to code our BOOST robots. Before you begin coding, here are some important instructions you must follow:

  1. Before you use the Scratch programming language, you need to install Scratch Link on your device, which will help you connect your BOOST kit to the device over Bluetooth. You can download Scratch Link from https://scratch.mit.edu/boost.
  2. Now, make sure that it is active and appears on your toolbar and that your laptop's Bluetooth is on. Now, let's look at the Scratch programming software.
  3. If you wish to use the offline version of Scratch 3.0, you can download it from here: https://scratch.mit.edu/download.
  4. If you wish to use the online editor for Scratch 3.0, bookmark this link on your device: https://scratch.mit.edu/.
  5. Once you open this link, click on Create. The coding screen will open.

    Tip

    You may consider signing in on this software for the online version if you wish to save your program and eventually share it with the world, or even use it for yourself in the future!

  6. Now that the programming screen is open, click on the Add Extension icon, as shown in the following screenshot. This icon has been highlighted with a square here:
    Figure 2.15 – Programming screen

    Figure 2.15 – Programming screen

  7. Now, select/click on LEGO BOOST, as shown in the following screenshot:
    Figure 2.16 – Adding the BOOST extension

    Figure 2.16 – Adding the BOOST extension

  8. Now, turn on your BOOST by pressing the blue button. Make sure that it has six AAA-sized battery cells in it. It will start flashing blue the moment you press it.
  9. The following screen will appear on your device. Click on Start Searching:
    Figure 2.17 – Starting the scanning process

    Figure 2.17 – Starting the scanning process

  10. Keep your BOOST on and close to the device. The following screen will appear once it has detected your BOOST kit and is connecting:
    Figure 2.18 – Connecting with BOOST

    Figure 2.18 – Connecting with BOOST

  11. Once connected, the following message will appear:
    Figure 2.19 – Connection successful

    Figure 2.19 – Connection successful

    If you face any difficulties connecting your BOOST Hub to your device via Bluetooth, please visit https://scratch.mit.edu/boost for troubleshooting help.

  12. The LEGO BOOST programming blocks will be available just below My Blocks, under the BOOST header:
Figure 2.20 – BOOST programming blocks

Figure 2.20 – BOOST programming blocks

Voilà! With that, you are all set.

In the next section, we will challenge ourselves by running the tabletop fan you built at different speeds!

You have been reading a chapter from
Build and Code Creative Robots with LEGO BOOST
Published in: Nov 2021
Publisher: Packt
ISBN-13: 9781801075572
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime