Included changes from Thomas for Active lick detection (new circuit with resistance).