Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
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
Toc

Table of Contents (19) Chapters close

Learning LEGO MINDSTORMS EV3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Engineering Notebook 2. Mechanical Design 3. Drive Train and Chassis 4. Sensors and Control 5. Interacting with EV3 6. Output from EV3 7. Advanced Programming 8. Advanced Programming and Control 9. Experiment Software and Data Logging 10. Other Programming Languages 11. Communication between Robots 12. Advanced Robot – Gyro Boy Index

Display data


A very simple example of useful code would be to display a time counter on the screen. To do this, you wire the output from a Timer sensor block to the wired input of the Display block. You will want to erase the screen whenever the new time value is displayed.

At the same time, you can display the value of a sensor on the same screen. In the following screenshot, the value for the Color Sensor will be displayed on the screen. You can choose the x and y coordinates of the text, and I have the sensor value displayed just below the time. Additionally, the screen is erased only during the first Display block. When you click on the Mode Selector for the Display block, there are actually two text modes, Grid and Pixels. In the following screenshot, I have used Text Grid and the program writes the sensor values to row 3 on the Display screen. Each row in the grid is actually 10 pixels high.

As you saw in Chapter 5, Interacting with EV3, we can also display the value of a variable. In...

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