added debouncing to meter pin (needs testing)