Select
Drag a block under your code
This When block will be used to make the robot scan the ground.
Drag a inside the When block.
The If/Then/Else block will make the robot move depending on what it senses around it.