Detecting Speed of Robot with Accelerometer.

What if I had it move for a little bit of time before I started my calculations (time/distance)? If that will not work do you have any more ideas?

Thanks!