use Libraries.Robots.Lego.Motor//infrared15use Libraries.Robots.Lego.Sounduse Libraries.Robots.Lego.UltrasonicSensorMotor motor//instantiate actionsSound soundUltrasonicSensor ultrasonicultrasonic:SetPort(2) //Set the portnumber stopDistance=1.0 //a few variables in metersrepeat until ultrasonic:GetDistance() < 0.3 // move forward until you are .3 meters from the wall motor:RotateForward("B") motor:RotateForward("C") sound:PlayTone(55, 20)endmotor:Stop("B")motor:Stop("C")sound:PlayTone(880,1000)motor:RotateByDegrees("B",360)motor:RotateByDegrees("C",-360)motor:Wait("B")motor:Wait("C")sound:PlayTone(440,2000)