Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Lego Mindstorms EV3

You're reading from  Learning Lego Mindstorms EV3

Product type Book
Published in Jan 2015
Publisher
ISBN-13 9781783985029
Pages 284 pages
Edition 1st Edition
Languages
Author (1):
Gary Garber Gary Garber
Profile icon Gary Garber

Table of Contents (19) Chapters

Learning LEGO MINDSTORMS EV3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Engineering Notebook Mechanical Design Drive Train and Chassis Sensors and Control Interacting with EV3 Output from EV3 Advanced Programming Advanced Programming and Control Experiment Software and Data Logging Other Programming Languages Communication between Robots Advanced Robot – Gyro Boy Index

Loop and the Gyro Sensor


Now we will repeat this exercise using the Gyro Sensor that comes with the Educational Version of the EV3 kit. If you have the Home version, you might consider buying the LEGO Gyro Sensor or the Gyro or Compass sensor from HiTechnic or other third-party vendors. You can buy the LEGO EV3 Gyro Sensor directly from LEGO, part number 45505, for about $30. In the following screenshot, you can see that the loop is the same except we will use a move to turn while steering until the Wait block is triggered by a change in state of the Gyro Sensor by 90 degrees:

Before you run the program, you need to make sure the robot is absolutely still. It is critical to calibrate the Gyro Sensor. You can do this either by unplugging it and plugging it back in while the robot is stationary, or by changing the mode of the Gyro Sensor. You can change the mode using Port View or by writing this into your program. We can now run this program. If you notice that your Gyro values keep changing...

lock icon The rest of the chapter is locked
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}