Added setCustomGain for AFE Gain, enhanced CountLightning sketch