removed dependency on arduino analogRead, saving 60 bytes