A button supplies two states; a potentiometer gives a 0–1023 analog reading; PWM uses 0–255 to set pulse duty cycle. These are three different kinds of signal.
Digital input asks a two-state question
digitalRead() returns HIGH or LOW. In the button lesson a pull-down resistor keeps the input LOW when the switch is released, and pressing the button connects the input to the high level. A floating input has no dependable resting state. With an internal pull-up arrangement the wiring and meaning of a press are different.
Analog input measures a level
The Uno’s analog inputs convert a voltage into a 10-bit number from 0 to 1023. In the knob lesson, the middle terminal of a potentiometer feeds A0. With the lesson’s 5 V reference, the reading changes as the wiper moves. This is a quantized measurement, not an infinitely precise voltage.
PWM changes time, not the high voltage
analogWrite() on a supported Uno PWM pin uses a value from 0 to 255. It changes how much of each cycle the output spends HIGH. An LED can look dimmer because its average delivered energy decreases, even though the signal still switches between digital levels. PWM is not the same as a true digital-to-analog converter.
Connect the ideas in one experiment
Open the potentiometer lesson. Run the sketch and compare the serial reading with LED brightness. The sketch divides the 0–1023 input by four to fit the 0–255 output scale. Try the two endpoints and the midpoint. Then compare this continuous-looking control with the button lesson’s two-state control.
Go beyond the experiment
Check the primary sources
Use official board documentation and component datasheets to check physical wiring and specifications.