Conditionals
Execute instructions dependeing on wheter these conditions are met or not, to manage outputs specially in this case using mBlock software
You can program the execution of an instruction (or a sequence of instructions) when a condition is met.
Example
• [If Dibujo] Si el semaforo está en verde, ENTONCES puedo pasar la calle
•Conditional "If_______, then_______. If not, else_______"
You can program the execution of another instruction (or sequence of instructions) when a condition is met; and the execution of another when that condition is not met.
Example
•If I open the door, then I can enter the room. If not, else I must stay outside. In this case:
·I open the door is the condition.
·I can enter the room is the consequence when the condition is met.
·I must stay outside is the consequence when the condition is not met.
I.
We will run the following workshop, according the following video:
II.
Controlling The PlayShield LED lights with the Keyboard, and a Light Bulb on the Screen with the PlayShield Buttons:
Resources:
No hay comentarios:
Publicar un comentario