O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required


Book Description

Build and create interactive, sensor-based robots using your LEGO MINDSTORMS EV3 kit

In Detail

The LEGO EV3 is a programmable LEGO brick that can control different motors and take input from buttons and numerous sensors, allowing you to build sophisticated robots from a simple children's system of modular bricks. You can build your very own robot using your EV3 kit, but there is a lack of good documentation in regards to the details of robot building!

This book is a practical guide that will show you how to advance beyond the basic lessons included in your EV3 kit, combine core programming commands, and implement tested design principles when building your own robot. You will become familiar with resources beyond your EV3 kit and enhance your robot designs.

What You Will Learn

  • Design a robot for optimum navigation and place sensors for optimal calibration
  • Control multiple robots through a master robot
  • Decipher the advanced programs developed by LEGO
  • Account for weight and balance issues in your design
  • Calibrate the sensors using buttons on the robot
  • Utilize core programming concepts such as loops, case structures, calculations, variables, and arrays
  • Enhance your programs with proportional and PID control

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

    1. Table of Contents
    2. Learning LEGO MINDSTORMS EV3
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Engineering Notebook
      1. The engineering design process
      2. Content Editor features
      3. New pages and page actions
      4. Computer-aided Design and building instructions
        1. LEGO Digital Designer
        2. LDraw
      5. Commenting on your code
      6. Summary
    9. 2. Mechanical Design
      1. Mechanical advantage
      2. Motors
      3. Large motors and gears
      4. Writing a program
      5. Bevel gears at right angles
      6. Worm gear
      7. Using wires and parallel threads
      8. Summary
    10. 3. Drive Train and Chassis
      1. Chassis
      2. Skid-bot with the Retail kit
      3. Caster-bot with the Educational kit
      4. Tread-bot with the Retail kit
      5. Tread-bot with the Educational kit
      6. Programming the robot to move forward
      7. Summary
    11. 4. Sensors and Control
      1. Using sensors
      2. Programming blocks
      3. LEGO EV3 sensors
        1. Touch Sensors
        2. Color Sensors
        3. Motor Rotation sensors
        4. Gyro Sensors
        5. Ultrasonic motion sensors
        6. Infrared Sensors
      4. Third-party sensors
        1. Dexter Industries
        2. Mindsensors
        3. HiTechnic sensors
        4. MATRIX motor controllers and metal parts
        5. Vernier sensors
      5. Summary
    12. 5. Interacting with EV3
      1. Push buttons
      2. IR remote buttons
      3. Bluetooth control
      4. Smart device control
      5. Wi-Fi control
      6. Summary
    13. 6. Output from EV3
      1. Display
      2. Image Editor
      3. Display data
      4. Brick lights
      5. Legacy NXT/RCX lights
      6. Sound
      7. Music
      8. Summary
    14. 7. Advanced Programming
      1. Loop and the Motor Rotation sensors
      2. Loop and the Gyro Sensor
        1. Troubleshooting with the Gyro Sensor
      3. Switch or two-level controller
      4. Three-level controller
      5. Subroutines or My Blocks
      6. Arrays
      7. Summary
    15. 8. Advanced Programming and Control
      1. Distance controller
      2. Infrared versus Ultrasonic
      3. Proportional algorithm
      4. Line following using the Color Sensor
      5. Setpoint for line tracking
      6. Two-level or bang-bang controller
      7. Proportional line follower
        1. Entering gain and speed
      8. PID controller
      9. Gyro Sensor
      10. IR sensor navigation and beacon tracking
      11. Tracking a circle
      12. Triangulation
      13. Summary
    16. 9. Experiment Software and Data Logging
      1. Data logging software
      2. Improving dead reckoning
      3. Analyzing gain constants
      4. Graphical programming
      5. Other bang-bang controllers
      6. Summary
    17. 10. Other Programming Languages
      1. LabVIEW
        1. Front Panel and Block Diagram
        2. Programming blocks
        3. Loops
        4. Line following VI
        5. Robot tools
        6. Data
        7. Front Panel and clean Block Diagrams
        8. SubVIs
      2. RobotC
        1. Simple code
        2. Commands
        3. Variables
        4. Remote control
        5. Graphical programming
      3. Summary
    18. 11. Communication between Robots
      1. Enabling communication
      2. Messaging
        1. Follow the leader
        2. Maintain a distance
        3. Search and rescue
        4. Completing the search
      3. Summary
    19. 12. Advanced Robot – Gyro Boy
      1. Concept of a balancing robot
      2. The Gyro Boy model
        1. Sensor feedback
      3. Programming bugbears
      4. The main program
      5. The control program
      6. The RST My Block
      7. The gOS My Block
      8. The GT My Block
      9. The GG My Block
      10. The GM My Block
      11. The EQ My Block
      12. The cntrl My Block
      13. The CHK My Block
      14. Summary
    20. Index