movement algorithm and sensor update

Minor updates to the movement algorithm and sensor readings.  Also,
capped the pulse width to 10000 to prevent variable length delays
making movement too choppy.