$ 0 0 Check your hardware. I ran your code (with the fixes I suggested) and saw the value in speed_volt match the voltage I applied to pin PE3.