error handling for analog inputs