It looks like that will be an interesting project, I hope you will post your progress.
BTW, pulseIn is a blocking function, if this causes you a problem, you may want to consider using the Atmega chips hardware support for input capture on digital pin 8. There is no high level Arduino support for this and it's a little tricky to get going but the Atmega168 datasheet does cover input capture and you may be able to find out more using google if you decide you want to pursue this route.