I have done this a million times; connect a potentiometer's center pin to a pin in the microcontroller, and the remaining two pins to ground and vcc.
The microcontroller still works even though the potentiometer can short the pin to either of the power lines when placed at both extreme positions. I think it has to do with the pin not being able to draw more than a small amount of power. However, it is always discouraged to connect an led directly to a pin; how is this a different thing?
The microcontroller still works even though the potentiometer can short the pin to either of the power lines when placed at both extreme positions. I think it has to do with the pin not being able to draw more than a small amount of power. However, it is always discouraged to connect an led directly to a pin; how is this a different thing?