I have never used bitlash, so I don't know what those commands do.
Sorry, I am so used to bitlash that I (incorrectly) thought it is clear, its an Arduino playground project:
http://playground.arduino.cc/Code/Bitlash
I also don't know what the numbers are for stop1 to stop4.
These are the functions I defined with different stop behavior, see the output of "ls" command in previous posting.
I don't know which Arduino board you are using,
Arduino Pro mini, no board, see the photo above.
and I don't know which Arduino pins are connected to what.
pin8: 1A, pin9: EN1,2, pin10: 2A
Are you using analog pin A9 ? Which small Arduino board has A9 ?
No, "d8=0" is bitlash short form for "digitalWrite(8, 0)", "a9=255" is short form for "analogWrite(9,255)" (9 is PWM pin).
The L293D has transistor outputs. I think the "fast stop" will only work with the 4 diodes as in the datasheet.
The L293D has also internal clamping diodes, perhaps they can do that as well for small currents.
I read and thought that the "D" in L293D (compared to L293) mean that I do not need external diodes.
Each motor takes 0.21A at maximum efficiency, and I did drive the motors with 12V from 3 LiPos (see data sheet).
With the enable low, the outputs should be high impedance.
That should result into a free running unpowered motor.
However, the diodes are still there, causing a circuit that does not allow free running.
That explains the behavior of stop3 versus stop4:
Setting speed to 0 in stop3 before stopping seems to be free-running then (2.72s).
Setting speed to 255 in stop4 [same as digitalWrite(9,HIGH)] seems to be full motor stopping (1.80s).
Some Arduino users set a reverse current for a short period for a faster stop.
I did that experimentally, but it does not sound healthy and I did read at several places that full speed reversing of motor is not something one should do, hear into this youtube video (reversing direction at full speed every second):
Perhaps I will have to give it a try.
I did normal stopping with my Arduino Uno robot at speed of 3.1m/s after 2 seconds (the LED gets turned on then) at the leg of grand piano 1.5m ahead of kitchen door:
The (high) speed did not avoid (loud) hard stop at kitchen door:
Here is complete "Arduino robot, first autonomous full speed test" video:
The used motors and wheels did show 9.89m/s in Motor test station:
The weight of robot was comparable, not sure why Arduino Uno robot did "only" 3.1m/s at full speed.
If it is friction at half table tennis ball (the only real difference) then I would not have awaited to loose more than 6m/s.
I am trying to get even more speed by more powerful motors.
And the robot has ultrasonic sensor now with range 2-400cm:
But even 4m is short notice if I cannot get stopping under control.
"Thunderstorm" robot does 3.1m/s on average with many turns, and is able to stop nearly immediately:
Not sure how to stop that abrupt, but the video proves that it is possible.
You could try a modern mosfet motor driver.
What would be the advantage of a mosfet driver over L293D?
Hermann.