LEGO Engineering

| | | | | | | |
What is the NXT-G switch block for?


20th of April, 2010

(24 )
91% thumbs up 8% thumbs down

The 'switch' block allows you to set different actions to occur according to the state of a certain input. Here is an example of how the NXT switch block is used:



In this example, the NXT checks the state of the input from the light sensor. If the light sensor senses a lot of light, the NXT moves motors B and C and plays a sound. If the light sensor does not sense very much light, the NXT moves motors B and C and then motor A.
   :
   :
* :
* :