Slightly improve exception handling
Rework analog pin numbers, fixes #4