1-Wire Search algorithm implemented in Java