Chapter 17: The Moon Rover

We all live on planet Earth! But did you know that there are millions of planets in space? Although we have fantasized about having life like humans on other planets, we have never seen any until now. Scientists across the globe are trying hard to find traces of life and other resources on different planets every day! We have already been successful in sending robots to Mars and our very own moon to carry out various research projects, such as finding oxygen, water, and minerals. These days, scientists are trying to establish the fact that humans can survive on other planets as well! Elon Musk is already planning to have a habitat for humans on Mars by 2025 and send humans to live there. Recently, India sent a rover to the moon that crash-landed just 4 seconds before the actual landing. If the mission had succeeded, it would have been the cheapest space mission in history.

In this chapter, you will build a similar rover and explore some interesting areas on the moon:

Figure 17.1 – Vikram lander carrying the Pragyan rover

Figure 17.1 – Vikram lander carrying the Pragyan rover

In this chapter, we will cover the following topics:

  • Building the moon rover
  • Let's code the robot to perform different tasks
  • Time for a challenge

Since the terrain in such places is uneven, having track wheel drive will help us keep the robot moving in such conditions, without falling into small pits or bumps. Hence, we will be using a track wheel drive for our robot.

Technical requirements

In this chapter, you will need the following:

  • A LEGO BOOST kit with 6 AAA batteries, fully charged
  • A laptop/desktop with the Scratch 3.0 programming language installed and an active internet connection
  • A diary/notebook, along with a pencil and eraser
  • Blue, green, and yellow sticky notes

Building the moon rover

Refer the following link for the detailed build instructions of the moon rover:

https://github.com/PacktPublishing/Build-and-Code-Creative-Robots-with-LEGO-BOOST/blob/main/Bonus%20Chapter/Chapter17/B17095_BuildInstructions_17_Final_NM.pdf

The moon rover will look like this:

Figure 17.2

Figure 17.2

In the next section, we will complete some interesting activities with this moon rover.

Let's code the robot to perform different tasks

This robot is on a mission to identify various minerals on the surface of the moon. First, use your sticky notes and create the following setup:

Figure 17.3 – Route setup

Figure 17.3 – Route setup

Here, blue represents iron, green represents copper, and yellow represents gypsum.

Activity #1

Write a program so that your rover does the following:

  1. Stops on any colored line (blue, green, or yellow) on its route.
  2. If blue is detected, wait for 2 seconds and display Iron found!.
  3. If green is detected, wait for 2 seconds and display Copper found!.
  4. If yellow is detected, wait for 2 seconds and display Gypsum found!.

The sample code for the activity is given here:

Figure 17.4 - Sample code

Figure 17.4 - Sample code

You can use sound blocks at the respective locations to make this project more interactive. The program should work for all iterations of the colored sticky notes. Any sequence should work.

Time for a challenge

In this section, you will build some game elements from LEGO bricks on your own. Your robot already has a grabber hand attached to it. You must build three elements that represent copper, iron, and gypsum, respectively. The grabber should be able to pick up these three elements. Now, set up the route shown in the following diagram. These elements should be called iron ore, copper ore, and gypsum ore:

Figure 17.5 – Challenge route set up

Figure 17.5 – Challenge route set up

Now, let's get started!

Challenge #1

After completing this setup, write some code that will make the robot do the following:

  1. Pick up the ore from their respective locations and drop them at their drop locations.
  2. Display the pickup and drop on the screen.
  3. Use sound blocks appropriately.
  4. If possible, play with the BOOST Hub brick light as well.

You can try to add more features to this robot and try to complete more interesting tasks on the surface of the moon with this rover.

Summary

In this chapter, you learned how space missions work. Usually, they have extremely complex control systems, construction, and coding as they must send signals from millions of miles away to the Earth. Besides this, they must combat extremely hot and cold temperatures throughout their journey. You built a rover with track wheel drive and completed missions to identify minerals on the moon.

Further reading

You can learn more about India's mission moon (Chandrayaan 2) at https://www.isro.gov.in/chandrayaan2-home-0.

The failure of this mission has not deterred the intentions of scientists at ISRO, and they are already preparing for Chandrayaan 3, with its proposed launch being in November 2022.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.6.75