Reader small image

You're reading from  Build and Code Creative Robots with LEGO BOOST

Product typeBook
Published inNov 2021
PublisherPackt
ISBN-139781801075572
Edition1st Edition
Concepts
Right arrow
Author (1)
Ashwin Shah
Ashwin Shah
author image
Ashwin Shah

Ashwin Shah is an Electronics and Communication engineer from India. Teaching is his passion and he started working at the tender age of 16 as a doubt solver for younger kids at after-school classes. Today, he is a successful edupreneur who runs his own STEM-based robotics, coding, and IoT institute - RoboFun Lab. Being one of the pioneers of STEM education in India, he has taught over 3000 students and trained 200+ educators thus far. He has trained 100+ teams for prestigious STEM competitions with 50+ national and 12+ international awards in the bag. Most of his students are now pursuing careers/education in STEM at prominent universities. Ashwin was a state-level badminton player during his college days.
Read more about Ashwin Shah

Right arrow

Let's code the robot without wheels

Open Scratch 3.0 and connect your BOOST Hub to your laptop as per the instructions given in Chapter 2, Building Your First BOOST Robot – Tabletop Fan. While performing some activities today, we shall understand the difference between seconds-based and rotation-based programming.

Before we move on to the task, let's learn about two new programming blocks:

  • set light color to: This block changes the light color of your BOOST Hub:

Figure 3.20 – New block to learn

  • wait: This block waits for the number of seconds that the user inputs and lets the previous block execute for that time. We will learn how to use it while writing some code in the tasks. This block is found in the Control pallet:

Figure 3.21 – Wait block in the Control pallet

Set light color:

Figure 3.22 - Changing the hub light colors

This is how the light color...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Build and Code Creative Robots with LEGO BOOST
Published in: Nov 2021Publisher: PacktISBN-13: 9781801075572

Author (1)

author image
Ashwin Shah

Ashwin Shah is an Electronics and Communication engineer from India. Teaching is his passion and he started working at the tender age of 16 as a doubt solver for younger kids at after-school classes. Today, he is a successful edupreneur who runs his own STEM-based robotics, coding, and IoT institute - RoboFun Lab. Being one of the pioneers of STEM education in India, he has taught over 3000 students and trained 200+ educators thus far. He has trained 100+ teams for prestigious STEM competitions with 50+ national and 12+ international awards in the bag. Most of his students are now pursuing careers/education in STEM at prominent universities. Ashwin was a state-level badminton player during his college days.
Read more about Ashwin Shah