Control motor speed using a potentiometer. Potentiometer voltage readings are passed through a digital low pass filter to smoothen speed transitions. Speed in RPM is displayed on a seven-segment display.
Hc = tf([1], [1/(2*pi*1), 1]);
bode(Hc);
Hd = c2d(Hc, 1/200);
0.03093
----------
z - 0.9691