Book Image

Lego Mindstorms EV3 Essentials

By : Abid H. Mujtaba
Book Image

Lego Mindstorms EV3 Essentials

By: Abid H. Mujtaba

Overview of this book

<p>Building robots from scratch can be a tough task, but the Lego Mindstorms EV3 robotics kit makes it easy to create them in minutes. Far more than a toy, the programming brick allows you to create functional robots while its open source and hackable nature will allow you to use the powerful LeJOS framework to create projects of increasing complexity.</p> <p>This book provides a rapid and practical guide to building with EV3. Get up and running and swiftly learn how to construct and program automated robots using the EV3's brick, motors, and sensors. Next, you'll construct an obstacle-avoiding robot and learn how to program the EV3 brick before moving on to the advanced possibilities of the LeJOS framework. You will also learn how to install LeJOS, link your computer to EV3, and how to use it to program your Lego robots in Java. You will then quickly get to grips with using LeJOS by constructing an autonomous line-tracking robot. By the end of this book, you will be able to unleash the full creative power of Lego Mindstorms EV3.</p>
Table of Contents (19 chapters)
Lego Mindstorms EV3 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Make Utility
Index

Summary


In this chapter, we went through all of the steps required to prepare a computer for compiling code meant for an EV3 running LeJOS. We started by installing and testing the JDK, and in the process, we wrote perhaps our first Java program.

We then learned about Gradle, a build system for Java projects, and installed and tested it. The final piece was downloading the LeJOS source code and libraries required to compile the code.

The chapter ended with a simple but instructive program for printing the string Hello, World to the EV3 brick's LCD screen. Every line of code in both the Java and Gradle build files was explained, and we ended by executing our first LeJOS program on EV3 itself.

This chapter has equipped us with the skills necessary to properly structure a Java project that uses LeJOS and Gradle. We learned how to compile the project, transfer it to EV3, and execute it. The rest of the book takes a deeper look at programming using LeJOS and how to construct complex robots.

At this...