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

Chapter 4: LEGO BOOST Rover

Anything that reduces human effort is called a machine. A simple machine is a mechanical device for applying force. Any complex machine is a combination of two or more simple machines. We will learn how to apply a few of these simple machines in our upcoming projects. In science, there are a total of six simple machines, as follows:

  • Wheel and axle
  • Pulley
  • Lever
  • Wedge
  • Screw
  • Inclined plane

Wheels and axles help move heavy loads from one place to another by reducing the friction between the load and the surface, owing to its round shape. The wheel is considered one of the greatest discoveries of mankind. You can find numerous examples in and around your vicinity where wheels are used extensively to make things move easily, for example, your holiday suitcase! Have you ever tried picking up your suitcase when it is completely full? It is extremely heavy and almost impossible to lift, right? And what does your suitcase have? It...

Technical requirements

In this chapter, you will need the following:

  • A LEGO BOOST kit with six AAA batteries, fully charged
  • A laptop/desktop with Scratch 3.0 installed on it and an active internet connection
  • An A3 size drawing sheet with a pencil and ruler

Building the BOOST rover

In this section we will build the robot as shown in the following figure:

Figure 4.1

Follow the given steps to build the robot:

  1. Make sure you insert six AAA working batteries into your BOOST Hub before you start the construction process:

    Figure 4.2

  2. Now, take two 2x6 bricks with bows. Attach them to the BOOST Hub:

    Figure 4.3

  3. Now, take two 1x2 plates with ball cups. Connect them to the 2x6 bricks with bows:

    Figure 4.4

  4. Take a 4x6 brick and connect it to the BOOST Hub, as shown here:

    Figure 4.5

  5. Take a 2x4 brick, a 2x6 plate, and a 2x4 bearing element with a snap. Attach the 2x6 plate first and then attach the 2x4 brick to it. Now, connect this 2x4 bearing element with a snap on the top of it:

    Figure 4.6

  6. Take two 5.5M axles with 1M stops and connect them to both motor A and motor B of the BOOST Hub:

    Figure 4.7

  7. Now, take two 3x5 angular beams and connect them to the axle on both sides:

    Figure 4.8

  8. Take four 2M...

Making the rover move

First, let's learn how to make our robot move straight by powering both motors at the same time. We will be using the same programming blocks that we used in Chapter 2, Building Your First BOOST Robot – Tabletop Fan, and Chapter 3, Moving Forward/Backward Without Wheels, but we will be selecting the AB option from the drop-down menu, as shown in the following screenshot. Here, I have written a program to make the robot go forward for two rotations at 100% speed:

Figure 4.28 – Selecting "AB" from the drop-down menu

Now that you know how to power both motors at the same time, let's write the main code:

Figure 4.29 – Sample program for forward programming

Now, let's perform a few activities.

Activity 1

Can you program your robot to do the following?

  1. Move forward for 2 seconds at 60% speed.
  2. Wait for 2 seconds and change the BOOST Hub light's color...

Time for a challenge

Challenge #1

One more way to make turns is by simply running both motors at different speeds. By doing so, your robot will steer just like your car, instead of turning sharp at that very point. This technique can be useful when you want to make smooth, long turns of form shapes such as an arc or a circle. Either draw a big circle or find a big enough circular object in your home and try to code your rover to move around it using this technique.

Challenge #2

Can you build a seesaw using the external motor and LEGO parts in your BOOST kit? A seesaw is a common example of a simple machine lever.

Summary

In this chapter, you learned how to use wheels and axles. You applied these to your robot and built your own rover with wheels using the BOOST kit. You also learned about new programming blocks such as set motor direction, repeat loop, and forever loop. We also looked at two different types of turns that are commonly used when coding robots to make them turn; that is, point and swing turns.

In the next chapter, you will be introduced to the fascinating world of gears and how to apply them to build a geared robot. You will perform a few activities to understand concepts such as gear up and gear down. This is going to be a lot of fun!

Further reading

As we mentioned at the beginning of this chapter, there are six simple machines you can use. We covered wheels and axles in this chapter. You should learn about the other five simple machines as well by going to the following page:

https://www.britannica.com/technology/simple-machine

If you know how to practically apply these simple machines, you will be able to build your own mechanisms in the future.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Build and Code Creative Robots with LEGO BOOST
Published in: Nov 2021Publisher: PacktISBN-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.
undefined
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 $15.99/month. Cancel anytime

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