Motor as potentiometer?

i guess like that