OK everybody, here's the code.
THANKS for your help! I've put description Exhibition / Gallery to make things neater:
http://arduino.cc/forum/index.php/topic,78866
Should mention programmer X (anonymous pal) wrote some very sweet encoder code; seems to not be enough of that around; it's in there.
Steve
PS. Yes, I know all the "30"'s in hydrographs can be replaced, we eventually want to have other numbers there