PaulS:
Let me guess. You need to get to the liquor store.
What is the purpose of operating the drive wheels for a fixed amount of time, apparently regardless of the speed, then operating the servo to move a fixed amount, then moving the servo back, then operating the drive wheels for a fixed amount of time and then coasting to a stop?
Thats all it needs to do. I know it's simple. Something I've had to tell everyone continuously.
You seem to have this as a mantra, so go ahead and write the code.
To run at some speed (you haven't defined what speeds the car will run at) for some time IS trivial. Start the motor, drop the hammer, and stick your head in the sand for a while. The statements are digitalWrite() to set the direction, Servo::write() to control the speed, and delay() to stick your head in the sand.
When you pull your head out of the sand, turn some undefined amount for some undefined period of time. Can't help you much with that, but it involves write() on the steering servo and delay(). randomSeed() and random(), too, perhaps.
Straightening the steering wheel again is just a matter of write()ing the steering servo back the neutral position.
After some period of time, cut the speed back to 0, and, hey, you're done.
I'm pretty sure that the car will be nowhere near where you expect, but that's not our problem.
PaulS:
You seem to have this as a mantra, so go ahead and write the code.
To run at some speed (you haven't defined what speeds the car will run at) for some time IS trivial. Start the motor, drop the hammer, and stick your head in the sand for a while. The statements are digitalWrite() to set the direction, Servo::write() to control the speed, and delay() to stick your head in the sand.
When you pull your head out of the sand, turn some undefined amount for some undefined period of time. Can't help you much with that, but it involves write() on the steering servo and delay(). randomSeed() and random(), too, perhaps.
Straightening the steering wheel again is just a matter of write()ing the steering servo back the neutral position.
After some period of time, cut the speed back to 0, and, hey, you're done.
I'm pretty sure that the car will be nowhere near where you expect, but that's not our problem.
I don't expect it to be anywhere so its nobody's problem.