Вы находитесь на странице: 1из 3

Clarify Objectives As a group, we must design and program a robot that must follow along an irregularly shaped loop.

Along the track, it must circumnavigate a red can and eventually stop on a green square and play a song that must last more than 5 seconds. If possible, the robot is allowed to circumnavigate the can for extra points. 1- In order to get the bot to follow the line we simply used Mosabs line following code from Quiz 6/7. The light values used are pretty much the same as the values used previously. The same sensor used to follow the black line stops it on the green square. 2- To detect the paint can, we used the exact same touch sensor to detect the brick from Quiz 6/7, only it is positioned slightly more to the left. 3- To circle around the can, we have an arm extending from the right side that touches the can while following it. Bot Designs Initial Bot Design:

This was our original design without the touch sensor installed. Originally, we wanted to shy away from the simple linebot design that we had used previously for Quiz 6/7. The bot would follow the line no problem but the biggest issue was the smaller set of wheels. The imbalance in the size of the wheels made the vehicle turn too quickly, so we reverted back to a variation on the linebot design.

Final Bot Design:

All of our designs after were more or less modifications of this final design. At first, the arm was simply another touch sensor similar to the one attached to the front of the bot. The sensor, though, did a poor job of following the can and would constantly fall off, so we shifted to this arm design. Initially, the arm did a poor job of following the can and would get stuck while circling. To counteract this, wheels were added and we had the final design of our bot. Now that we had our final design, we needed to make some adjustments to our code. The line following and stopping on green were already set from the code we had previously used for Quiz 6/7. Circling the can, however, was a different story. At first, we tried coding it so the bot moves in a square around the can, but we could not that, so we switched to a timer. The timer worked fine, but we constantly had to make adjustments concerning the speed of the vehicle, alternating constantly from 16, 17, 18, and even up to 22. Next, we tried setting up an event monitor that would count the number of time it passed over the black line while circling. The bot had trouble making more than one revolution, and after countless adjustments, we decided itd be best to use the timer again. We were finally able to have the bot circle around the can as many times as necessary.

Programming Table Thresholds TOO_DARK TOO_BRIGHT Sensors SENSOR_TOUCH SENSOR_TOUCH SENSOR_LIGHT OUT_A OUT_C Tasks Main Follow_line Bump_turnaround Wall Variables Green_square Values 40 50 Name TAP BUMP EYE LEFT RIGHT Function Sets up sensors, defines variables, and begins smaller tasks Follows the black line Touch sensor is triggered reversing the bot and begins task wall Circles around the paint can Definition stores value of green square

Вам также может понравиться