Hi, well i have an idea how to write my own code, but i have no idea how to get it more accurate, i mean i know i have to use timer1 (since it's 16bit) to count the time between the trigger on the first sensor and the second but i don't know how to do it exactly and i would like to see an example doing just that. Thanks