Missing pulses!

TolpuddleSartre:
Is it possible that the cord is being pulled at more than 3.84 ms-1?

No not that high. We pull the chord just by hand in somewhat of a speed, less than what gravity would do, but it still doesn't work...

PaulS:
What is the value of k? What type is penetration? If you are adding 2, why is penetration anything but an int (or long)?

What baud rate are you sending data out at?

penetration and k are floats.

I guess we could work in tens of millimitres and get by with ints.

k is like 0.0025 [metres], the resulotion is very high... First I thought it was like two centimetres.

Baud is 19200