Get a clean reading
Play one string at a time and let it ring. Mute the other strings with your picking hand, keep the guitar close to the microphone and avoid background noise. Pick with medium strength; a very hard attack makes the pitch jump for a moment before it settles.