Wednesday, February 10, 2016

Lesson 58: More pitfalls

Created project named ABC xyz
Added program Sound block "okie dokey"
Added program Display block "thumbs up" (Lego > Image > Information)

Now download project into EV3 brick and execute program
Hear only "Okie dokey" but didn't see "thumbs up" sign? This is because sign displayed for fraction of a second, too fast for human eye to notice, then project cleans up by shutting off speaker and clear screen IMMEDIATELY.

Different blocks takes different amount of time to execute

The Sound block: Default is for sound block to finish playing sound before moving on to next block


The DISPLAY block, however, default is first erase whatever is displayed on screen (ERASER icon is ticked), then display the picture for a split second, then clean up screen IMMEDIATELY.


Below is a table showing what

What our program doesWhat we want it to do
Play a sound completelyPlay a sound completely
Display a pictureDisplay a picture
Clean up immediatelyWait a few seconds
 :Clean up

To be visible to human eye, need to delay the cleanup. Add a WAIT block (in orange tab folder), set it for TIME, then set time to display, say, 2 second


Now download the edited project to EV3 brick and play the program and this time after speaking "Okie Dokey" the screen will display for 2 second before brick cleans up.

For more details, view Prof. Jennifer's video at Lesson 58: More pitfalls, then do the revision questions.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...