Thursday, February 11, 2016

Lesson 68: MORE DISPLAY (Part 4: Displaying Text)

This lesson explain how to display 2 lines of text simultaneously


While we can specify the start of the text in pixels
We can also also use GRID MODE. For displaying text, easier to use grid mode
lEGO ev3 divides the screen grid into
22 columns horizontally (x-axis) starting from 0 to 21
12 rows vertically (y-axis) starting from 0 to 11
Each row can display 1 row of text


Now open EV3 software to practice displaying text.
Add a PLAY block from the FLOW palette to the active window
Add a DISPLAY block, click the IMAGE FOLDER


Select TEXT > GRID


Type the text you want to display in the white box of the green bar of the DISPLAY block (ROBOT ROCKS)
Set text to display at grid
X 7th column, Y 6th row



Then select Font size as 1 (font size 1 = fond is 1 column size, 2 is 2 column size)
Repeat above, but this time type text "This is Cool!
Set X at 3, Y at 7, but this time set ERASER (Clear Screen as FALSE) so at the end of the first DISPLAY "ROBOT ROCKS" is not erased
Then add a WAIT block and set 2nd DISPLAY text to wait for 2 second before it cleans up (reset screen)

Now save file, download to EV3 block and run.


Now add a second DISPLAY block,



https://cs4hsev3robots.appspot.com/unit?unit=38&lesson=68
MORE DISPLAY (Part 4: Displaying Text)

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...