August 2010
Intermediate to advanced
288 pages
13h 21m
English
Passing data out of a Switch block can be a little more complex than passing data in because of the way the wires need to be connected. The LogicToText program shown in Figure 9-9 is a very simple example of passing data out of a Switch block. This program reads the Touch Sensor and writes True on the display if the button is pressed and False if it’s not. Both Sequence Beams inside the Switch block contain a Text block whose output plug is connected to the Display block. The tricky thing here is that the Text blocks on both Sequence Beams need to be connected to the Display block.

Figure 9-9. The LogicToText program ...
Read now
Unlock full access