![Building Smart LEGO MINDSTORMS EV3 Robots](https://wfqqreader-1252317822.image.myqcloud.com/cover/33/36700033/b_36700033.jpg)
Change to tabbed view
In the top left corner of the switch block, there is a small button that toggles Tabbed View. This compresses the switch slightly so that it only shows one case at a time, and you can switch between the two cases using the tabs at the top of the switch. We will be writing a lot of programming in the true case of the switch, so selecting tabbed view will streamline the program a bit.
After selecting tabbed view, the switch will reconfigure itself and the code will look like this:
![](https://epubservercos.yuewen.com/3D99B5/19470395308895206/epubprivate/OEBPS/Images/f85cc1c5-01e0-4cb8-9876-d4277faf18e9.png?sign=1739541235-Sy7F1Af01JJTnisd8Qz58ekPe9Aiuz0n-0-7d13c02abc70f69bd3676d036c950241)
We have finished the false case of the switch! The robot will check IR 2 to see whether a beacon is present. If there are no nearby beacons, the robot will halt all of its motors and wait until one comes within sight. But what if there is a beacon present?
Use the tabs at the top of the switch to select the true case. It is now time to start programming the true case:
![](https://epubservercos.yuewen.com/3D99B5/19470395308895206/epubprivate/OEBPS/Images/39ca886a-b920-49ba-9889-a419a0c3c8a9.png?sign=1739541235-WJaFcnNM6O04k7u2cERQt2XZqjp2yHcr-0-c9e26b85e57856e4498dcca7dd2cffe0)