In RVW complete the following Sensor Challenges: Hand in your code for each challenge (you can...

Free

80.2K

Verified Solution

Question

Programming

In RVW complete the following Sensor Challenges: Hand in yourcode for each challenge (you can paste into one document)

Try – it Forward until Touch Move the robot to theobstacle.  Once the robot touches the obstacle itstops

Vacuum Challenge – Using the touch sensor, the robot needs totouch all four walls in the room

Arm Position Classic - For this challenge, The robotic arm isconfigured with the Touch Sensor attached so that it when the armis fully upright the button on the Touch Sensor is pushedin.   The starting point of the challenge has anobject approximately 5 rotations length away from the robot.Starting with the arm in the ‘down’ position, program the robot toraise its arm until the touch sensor is pushed in, move forward 5rotations, lower the arm around the object, and then bring theobject back to the starting location.

Threshold Value - Using the Ultrasonic Sensor, set the thresholdvalue so that the robot plays a sound when it detects an objectwithin 10cm of the sensor.

Backward until far - Place a robot close to a wall with theUltrasonic Sensor facing directly at it. Program the robot to movebackward until the Ultrasonic Sensor reads a value greater than30cm, and then stop.

Submit to Blackboard:

A document that contains your code for each of the abovechallenges.  

Click on the badges icon to view your badges. In the samedocument, a screen shot of the badges earned to show you completedthe challenges successfully. Although the screen shot below showstwo challenges completed, yours should have five completed.

Answer & Explanation Solved by verified expert
4.3 Ratings (891 Votes)

soln: try it

task main()

{

repeat(forever)

{

setMotorSpeed(leftMotor , 60);

setMotorspeed(rightMotor,60);

waitUntil(getTouchValue(touchSensor) == 1);

{

setMotorSpeed(leftMotor , 0);

setMotorspeed(rightMotor,0);

}

}

}

answer 2:

task main()

{

repeat(forever)

{

setMotorSpeed(leftMotor , 60);

setMotorspeed(rightMotor,60);

waitUntil(getTouchValue(touchSensor) == 1);

turnRight(90 ,degrees , 60);

{

waitUntil(getTouchValue(touchSensor) == 1);

turnRight(90 ,degrees , 60);

{

waitUntil(getTouchValue(touchSensor) == 1);

turnRight(90 ,degrees , 60)

{

waitUntil(getTouchValue(touchSensor) == 1);

turnRight(90 ,degrees , 60)

}

}

}

}

answer abc:

task main()

{

repeat(forever)

{

setMotorSpeed(leftMotor , 60);

setMotorspeed(rightMotor,60);

waitUntil(getTouchValue(touchSensor) == 1);

{

waitUntil(getDistanceValue(Ultrasonic Sensor) == 10);

{

ap.loadSoundSet(\"Aldebaran\");
					fileId = ap.post.playSoundSetFile(\"filename\");

}

setMotorSpeed(leftMotor , 0);

setMotorspeed(rightMotor,0);

waitUntil(getDistanceValue(Ultrasonic Sensor) == 10);

{

movereverse (waitUntil(1,getDistanceValue(Ultrasonic Sensor) == 30);

}

}

}


Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students