Programming the EV3 Traffic Light: A Guide to the Display Module’s Correction Fluid Function

Apzhou LEGO – Let children build the world with their imagination!

This issue explains the programming of the EV3 traffic light, covering the countdown function and the hidden features of the display module!

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

To facilitate understanding, I have organized the programming of the traffic light rules in a distributed manner, implementing the following programming step by step:
1. The program runs continuously, displaying a green light for 10 seconds while showing an “upward arrow”, then a yellow light flashing for 5 seconds while displaying “wait”, and finally a red light for 10 seconds while displaying “stop”, repeating this cycle;

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid FunctionThe wait module used above is for convenience, and a timer can also be used.

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

2. Display the countdown, first showing a 10-second countdown, then a 5-second countdown, and finally another 10-second countdown;

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid FunctionProgramming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

3. Combine the above two programs to display the countdown while showing the traffic light and indicator icons;

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid FunctionHere’s a trick: when displaying the countdown starting from 10 seconds, if you do not include the following module in the 02 cycle, your countdown will show 10, 90, 80…10. Since you need to display the countdown and the previous “upward arrow” simultaneously, the countdown module cannot use the clear screen function; when “10” is displayed, “1” will be covered by “9”, but “0” cannot be cleared.

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

This module functions similarly to applying a layer of correction fluid within this rectangular box, covering the un-cleared “0”; the term correction fluid was used by one of my students in class, and it also serves as a partial clear function.When using the partial clear function, note to set “Clear Screen – Pseudo”, “Fill – True”, “Color – True”; choose the position and shape as needed!

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function4. Complete Program:

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function5. Conclusion:

During the teaching process, many teachers focus on mechanical structure and practical programming, often neglecting the image indication function. The programs and models included in the EV3 software are designed to work with image displays. I also hope everyone can apply the display module more in class.

Programming the EV3 Traffic Light: A Guide to the Display Module's Correction Fluid Function

Welcome to follow!

Leave a Comment