//skip this line use Libraries.Robots.Lego.Motor //4in1ROBOT Motorsuse Libraries.Robots.Lego.Utility use Libraries.Robots.Lego.Buttonuse Libraries.Robots.Lego.Screen Motor motorUtility utilityButton buttonScreen screenscreen:OutputCenter("4in1 Robot",1)//display text on screenscreen:Output("UP-Spin",2)screen:Output("RIGHT-Circle",3)screen:Output("DOWN-Big Circle",4)screen:Output("LEFT-Spiral",5)screen:OutputCenter("ESCAPE to end",6)repeat until button:IsButtonPressed(button:ESCAPE_BUTTON) if button:IsButtonPressed(button:UP_BUTTON)//spin robot motor:SetSpeed("B",25) motor:SetSpeed("C",25) motor:RotateByDegrees("B", 360*2) motor:RotateByDegrees("C", -360*2) motor:Wait("B") motor:Wait("C") motor:RotateByDegrees("B", -360*2) // spins clockwise. motor:RotateByDegrees("C", 360*2) motor:Wait("B") motor:Wait("C") elseif button:IsButtonPressed(button:RIGHT_BUTTON) motor:SetSpeed("B",50) //Circle Robot motor:RotateByDegrees("B",1800) motor:Wait("B") motor:RotateByDegrees("B",-1800) motor:Wait("B") elseif button:IsButtonPressed(button:DOWN_BUTTON)//BigCircle motor:SetSpeed("B",50) motor:SetSpeed("C",25) motor:RotateByDegrees("B", 360*7) motor:RotateForward("C") motor:Wait("B") motor:RotateBackward("C") motor:RotateByDegrees("B", -360*7) motor:Wait("B") motor:Stop("C") // New Line to stop motor elseif button:IsButtonPressed(button:LEFT_BUTTON)//spiral integer speedB=1 integer speedC=-5 motor:SetSpeed("B",speedB) motor:SetSpeed("C",speedC) repeat 75 times motor:RotateForward("B") motor:RotateForward("C") utility:DelayMilliseconds(200) speedB = speedB+2 speedC = speedC+1 motor:SetSpeed("C",speedC) motor:SetSpeed("B",speedB) end //end of the repeat motor:Stop("C") motor:Stop("B") end//end of last elseifend//end of the repeat until