Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Smart LEGO MINDSTORMS EV3 Robots

You're reading from  Building Smart LEGO MINDSTORMS EV3 Robots

Product type Book
Published in Apr 2018
Publisher Packt
ISBN-13 9781788471565
Pages 258 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Kyle Markland Kyle Markland
Profile icon Kyle Markland

GPS Car – Autonomous EV3 Navigation

We are ready to make our final smart robot, the GPS Car! This smart vehicle is equipped with a GPS receiver and a digital magnetic compass, and its smart software allows the car to navigate to a pair of coordinates defined by the user. Yes, you can choose a location and the GPS Car will drive there! The GPS Car boasts sophisticated navigation sensors and advanced programming, which makes it the smartest robot in this book.

The GPS Car is based on the Falcon race car that we built in the previous chapter. We will convert the Falcon from remote control to autonomous by adding the navigation sensors and writing two new programs. The hardware will remain largely the same, which allows us to focus on writing our most sophisticated programs yet.

In this chapter, we will start by making some minor physical modifications to the Falcon and adding...

Technical requirements

You must have EV3 Home Edition Software V1.2.2 or newer installed on your computer. You may also install LEGO Digital Designer (LDD) V4.3 and download the LDD file for this project to guide you in the building process.

The LDD file is available on the Downloads page of the Builderdude35 website:

http://builderdude35.com/download/gps-car-ldd/

The LDD and EV3 files for this chapter are available on GitHub:

https://github.com/PacktPublishing/Building-Smart-LEGO-MINDSTORMS-EV3-Robots/tree/master/Chapter07

Check out this video to see the robot in action:

https://goo.gl/gCAZQ9

Hardware

We will use the Falcon as the base robot and do some modifications that will enable it to navigate autonomously. Make sure that you have read the previous chapter and that you are familiar with how the Falcon's hardware works before you proceed.

We will be adding two navigation sensors to the Falcon: a Dexter Industries dGPS and a HiTechnic compass sensor. We will take a look at how each of these sensors works and how they will enable the Falcon to navigate autonomously:

Dexter Industries dGPS

This is a simple GPS chip that connects to the satellites that orbit the Earth to give us an estimate of where the EV3 is in the world. The dGPS provides information such as UTC (time), latitude, longitude, heading, velocity...

Software

We will write two programs for the GPS Car. The first program is a simple GPS test program, and the second is the autonomous navigation program. Before we start programming, we will need to prepare the EV3 software for use with the third-party hardware.

Preparing the EV3 software

The dGPS and compass require specific software for them to be used with the EV3. Both sensors have their own programming block, which allows you to program the third-party sensor like you would program a standard EV3 sensor. Thankfully, the software is available for download for free from the manufacturers' websites. All we need to do is follow a few steps to download the third-party software and import it into the EV3 programming environment...

Summary

We covered many new topics as we made our smartest robot yet.

We introduced two navigation sensors used by self-driving cars in the real world: the GPS receiver and the magnetic compass. We discussed how they work and learned about the basic principles behind using these sensors.

Before we started programming, we learned how to import third-party software into the EV3 software to allow us to use these sensors with the EV3. We wrote a simple program to test the GPS and get a feel for using the sensor. Then, we wrote a more sophisticated navigation program in which the EV3 used its GPS and compass to navigate to a pair of coordinates defined by the user. While programming, we expanded our knowledge of MyBlocks by introducing parameters, which allow you to program input and output for the MyBlock.

Congratulations! You have completed the final smart robot project. You are...

lock icon The rest of the chapter is locked
You have been reading a chapter from
Building Smart LEGO MINDSTORMS EV3 Robots
Published in: Apr 2018 Publisher: Packt ISBN-13: 9781788471565
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 $15.99/month. Cancel anytime}