Wednesday, September 9, 2009
Making our cars drive in a rectangle
Making our cars drive in a rectangle was far more difficult than I expected. First of all, I expected to be able to set the two motors to drive at the same power level for a set period of time and have the car travel in a straight line. When I tried this though, the car started pulling to the left. As a test I then switched which side each motor was on, and the car pulled to the right, signifying that one motor was weaker than the other. Once I knew this, I was able to offset the more powerful motor from power level five, which both motors had been on, to power level four, which made the two motors put out the same amount of power and allowed the car to travel in a straight line. The other difficulty I encountered was how to get the car to turn at a 90˚ angle. I first tried having the two motors run in opposite directions at full power for one second, but that lead to a turn that was far too tight. Eventually, after quite a lot of experimenting, adjusting, and guessing, I discovered that the closest I could get to a 90˚turn was to have the two motors running in opposite directions with the more powerful one at power level two and the less powerful one at full power for 0.6 seconds. As with most things, I could not get the car to drive in a perfect rectangle, but after lots of experimentation and tweaking, I got the car to drive in the closest thing to a rectangle as I found it possible to achieve.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment