Arduino Pro Mini and a Trolley

Greetings All:

May I ask your collective assistance in writing the code for a project I am working on. Thank you in advance.
I will be using the Arduino-Pro-Mini to control a continuous rotation RC servo of a RC speed control for locomotion and a few range finder sensors.

Imagine a Trolly on 10feet of track with physical stops on each end.

Start up: The trolley will drive 2 feet stop and return to start, slowing down as it approaches the end stop, then drive 4 feet and the same return process and then 6,8 until it reaches the end (stop). Then it reverses and do the same from the opposite end. 2ft return, 4ft return, 6ft return, 8ft return, at (start) it starts all over again and continue running until it is turned off. I am using an Arduino 2560 for code testing but I have nothing to represent my progress.

components:
Trolly
Ultrasonic Range Finder
Arduino Pro Mini
RC CR Servo or Speed controll
6v dc power supply

What have you managed to make your hardware do so far?

When is our assignment due to be handed in?

Hi and thanks. First, my fat thumbs typo corrections. RC servo or a RC speed control for locomotion. I have been working on an AeroQuad for a while and was able to make everything function as expected. But that was easy as I didn't learn anything on writing code with it. I have nothing, as far as code is concerned written. I am an admitted rc addict and can make anything radio controlled. This project is due as soon as I can finish it. My son donated a small rc car for the test platform XD .

My son donated a small rc car for the test platform

Can you replace it's motor with a stepper motor? That would simplify things a lot.

I think you are modeling a trolley.

Don

oops, cant blame that one on the fat thumb. A stepper can be used instead of the servo. I do have one on hand, removed from a printer.

Any ideas?

If you can get the stepper working, you can solve the whole thing using it by dead reckoning, i.e. assuming that the stepper did what you asked it. You can add sensors to make it more certain, but the stepper will get you going. Can you salvage the stepper controller from the board? if not, make or buy one e.g http://www.sparkfun.com/products/10267 and you're in business.

Hi All, I have changed the sensors to these little guys from Pololu.

I will post my rendition of the code for the collective to chime in on.
thanks