Missing pulses!

TolpuddleSartre:
So my 3.84 ms-1 is way out.
So, every 2.5mm the cord moves, you receive a character.
The character takes around half a millisecond to transmit.
You then print a floating point number with four places after the decimal and a newline, and each character takes around 1 millisecond.

You do the arithmetic.

I think 1 m/s is good enough! Receiving rate is 19200, should be good enough.

PaulS:
Another way to look at it is this. For every character that comes in, you send out at least 8 (0.0025) at half the speed. Is it any wonder why you loose incoming data?

Get out of the stone ages. 9600 baud went out with 8 track players.

It doesn't matter, that baud rate that we're sending with is good enough, it's just for display.

But with the initial code the whole calculation was wrong. As long its the right value on the draw string variable we're happy. So it was probably an issue with over writing or similar.

As said, it seem to be working now with this buffer we included, we'we also tweaked down the array size quite a bit and its still happy. To long array and it stayed in the for-loop so long it was noticeable.