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

Appendix B. LeJOS and IDEs

The advantage of using Gradle as the build system for our LeJOS projects is that we can use any text editor to write the programs. This does not mean that you are bound to do so. Using an Integrated Development Environment (IDE) has many advantages, some of which are stated as follows:

  • Syntax highlighting (highlights syntax errors)

  • Code completion (offers possible options while you type)

  • Code inspection (you can easily navigate to class definitions)

  • A project-level view of the code

These advantages are worth the effort required to set up the IDE. Any IDE that supports Java can be set up to work with LeJOS. If you are familiar with an IDE, all you need to know is that you need to specify the locations of the source code. One location is obviously the root folder of your project. In addition, you need to direct the IDE towards the ev3classes and DBusJava folders that contain LeJOS's ev3 libraries. The build.gradle file does the exact same thing.

I recommend that you use an IDE only to edit the source code. Leave the compilation to Gradle and the automation of the compile-transfer-execute cycle to the Make utility.

Let me discuss a few popular Java IDEs (others are configured similarly). In case you are not inclined to read through the whole list, my recommendation is Android Studio (detailed at the end).