|
To find distance is pretty hard in PBASIC, anyways. We thought about it last year, but threw it away after realizing it would take up like 3 or 4 words. If you recall last year's kickoff, they had a crazy contraption with four light sensors on it, three stationary rotating on an axis and the fourth on top of them, rotating the light up and down. You could use this to find an angle between the ground and the top of the bin.
You could do all of this by finding the angle between flat and the top sensor, and finding the hypotenuse. However, sin, cosin, and tan are all unsigned integers in a word in PBASIC. However, if you didn't care about any of that, you could just chase down a bin by putting a pot on the robot, attaching the knob to your sensor array, and turning the robot untill the pot was 127 or whatever value is lined up.
__________________
"What most people do not understand is that the Buddha, the Godhead, resides just as comfortably in gears and circuits as in hills and trees. To believe otherwise is to dilute the Godhead."
-Robert Pirsig, Zen and the Art of Motorcycle Maintenance
Last edited by Skabana159 : 09-01-2003 at 15:59.
|