EV3 Phi. Display block as a last block in an EV3-G software program Pro Preview

How to be sure your image on the display can be seen when the program ends.

  • #397
  • 29 Apr 2017
  • 2:40

"The image is in the program but I can't see it"

We hear that phrase from our new students every time. The reason is that the display block can't be the last block in the program.
When a program, running on a robot ends. the display shows the programs menu list, and your image is not visible anymore.

Give it some time to see it

Put a wait block in order to be able to see the image that was the last block of the program. This way we postpone the end of the program and give ourselves some time to see the image.

English

One of the very common mistakes using the display block is to put the display block as a last block in your program. For example, you do some move forward and then you add the display block as a last block in the program. What will happen then?

Yes, the robot will move forward

but do you see a smiley face? Again.

It appears for kind of a millisecond and then disappears. You see it. The reason is that when you have the display block as a last block in the program first you'll have the motors move forward then the smiley face will be displayed on the brick screen and then the program will end. And when the program ends the whole display is cleared. And because we're not waiting for us to see the smiley face it just disappears. So, this is a very very common mistake with the display block. And the display block doesn't take some seconds to be executed like the sound, the sound will take, for example, a second for playing the sound. But displaying something on the screen happens very fast. So, you should be careful and if you're displaying something just put a wait block to be able to see it. In the program I'll add a new wait block as a last block in our program. In this way we move forward, display a big smile on the brick's screen. And then wait for 1 second and only after that because this is the last block in the program the program will end. So, we postpone the end of the program by using a wait block at the end of the program. Download.

You saw the smiley face. Move forward, show a smiley face, wait for a second and only then the program will stop.