$35
ECGR4161/5196, MEGR4127 – Introduction to Robotics Lab Assignment #5– Version 1.0 –
See Canvas for the due date/time
This lab assignment has one part and can be done in pairs. The main objective is to use the servo to report three ultrasonic measurements at the servo’s 0, 90 and 180 degree position.
Submission type: Video and lab report (Must include your names and all video requirements mentioned below)
Part 1: Programming the MSP432 board
Attach the servo as shown in the photo below, unless you use a level converter board (recommended).
Keep the ultrasound sensor attached (same wiring) as in lab 3. Find a way to mount the ultrasonic sensor on the servo arms. The setup does not need to be on the robot.
You will control the servo to turn to 0, 90, and 180 degrees and make ultrasound measurements at each position.
Again, like in lab 3, you are to take the median value of readings. Take five readings (you can do it faster this time, and you do not need to put your hand in front of the sensor). In the video, you only need to show the physical setup once at the beginning, then the screen while running two cycles (0, 90, 180 degrees).
The video you record should be no more than 30 seconds, and should capture the screen showing your measurements and the outputted best value. An example on the screen would be (in the Serial Monitor window):
Measuring at 0 degrees
Distance = 20 centimeters
Distance = 20 centimeters
Distance = 20 centimeters
Distance = 10 centimeters
Distance = 20 centimeters
Median distance at 0 degrees = 20 centimeters
Measuring at 90 degrees
Distance = 20 centimeter
Distance = 20 centimeter
Distance = 20 centimeter
Distance = 10 centimeter
Distance = 20 centimeter
Median distance at 90 degrees = 20 centimeters
Measuring at 180 degrees
Distance = 21 centimeter
Distance = 5 centimeter
Distance = 21 centimeter
Distance = 22 centimeter
Distance = 20 centimeter
Median distance at 180 degrees = 21 centimeter
Lab Report - Submission Instructions:
1. Upload a Video to your YouTube account (or other location with a URL).
2. Prepare a file, output to PDF that includes:
a. Your names
b. What the general objective the robot / apparatus is expected to perform, and c. URL of the video
d. (in report or video) Commentary on the lab (lessons learned, problems encountered).
e. Include your code listing as text, courier font, 9 point. Comment your code!
3. Upload the PDF to Canvas, Lab 5 submission