The Challenge
The challenge was to build and program a bot capable of traveling down the hallway in a straight line with the exact method of acheiving this goal being left up to the groups digression.
input factors
Before programming this bot, you needed to have a working knowledge of case structures.
Bot prototype
The build of the bot is simple enough. The motors are rather simply connected to the bot itself with a great deal more complex connects used to strengthen those initial ones. We are using a combination of powered wheels and an convention skid, which can bee seen in the bottom left picture towards the front of the bot, for locomotion. The bumper and trust connected to the gyro sensor is used to stabilize and prevent unnecessary jostling that would affect it's measurements.
|
The program
Some knowledge necessary to be able to better understand the program is that a major issue was that the gyro sensor experienced a rather consistent error in which it's measurement would drift by -1 per second. To remedy this, we used a local variable to store the degree measured by the gyro sensor and then add 1 to it to try and counteract this drift. Unfortunately by the time this solution was found, there was little time left to fine tune it to completely counteract the sensor drift.
This is the "True" branch of the program that tells the bot to drive straight if the bot is facing a degree between -10 and 10. The bottom left contains a separate but entirely important part of the program. it reads the measurements the gyro sensor is taking and displays it on the screen.
|
This is the "False, True" branch of the program that determines which way the bot will turn to correct itself so that it will face a degree between -10 and 10.
|
This is the "False, False' branch of the program. Its purpose is to allow the bot to continue traveling forward without turning if the degree the bot is facing is not over 10 or under -10.
|
FeedBack
We did not receive any feedback.
What I learned
I learned how to use local variables to modify data collected from sensors.
What I would do differently
If I had more time, I would have altered the programming to better accommodate for the drift in measurement experienced by the gyrosensor
Video Demonstration
Due to an odd quirk in our bot we were unable to completely puzzle out, slight differences in our bot's starting position radically altered the results of any given test. Of the three positions shown below, The middle had the most success. It is also the the position in which we managed to get the farthest, which was room 133 A.