knut_ny:
Thats right: v is an integer (+/- 32000+)
.........
use float for x,y and z (solves problem)
w will also always be an integer (int/int = int)
Okay I walked through the door after you pointed to it, thank you sir!
float z = pulseIn(2, HIGH);
float y = pulseIn(2, LOW);
float x = z + y;
float w = z / x;
int v = w * 4000;