Book Image

Learning Lego Mindstorms EV3

By : Gary Garber
Book Image

Learning Lego Mindstorms EV3

By: Gary Garber

Overview of this book

Table of Contents (19 chapters)
Learning LEGO MINDSTORMS EV3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
10
Other Programming Languages
Index

Graphical programming


The graphical programming features allow you to write simple programs based on sensor (or calculated) values on a graph. Unfortunately, you are limited to only the Action blocks, which include controlling the motors, the brick display, the brick lights, and the speaker. Again, the EV3 tutorials do a satisfactory job of explaining some elementary uses of the graphical programming. For instance, LEGO describes how to use the value of the temperature sensor to control a fan. One particular use of the graphical programming, which I like, is to program a three-level bang-bang controller. With the normal EV3 programs, this takes a few additional steps, but is rather straightforward with graphical programming. This also makes the concept of a setpoint and a bang-bang controller easy to understand for the most novice of students.

In the following screenshot, we see a graphical program using Reflected Light Intensity from our Color Sensor. The graph is broken into three regions...