In or Out ?

carguy:
You could mount two sensors in a row on the way out into the garden. And then whatever sensor alerts first will tell you in which direction the dog is moving.

I suddenly picture a little dog standing in a doorway wagging its tail...