I have a project with a Gear Motor running off separate power supply via a PWM driver to control it's speed. The motor has a disc attached to the shaft with a magnet embedded in the disc that triggers a hall sensor. The hall sensor is currently connected to a display which counts the revolutions in real time. I would like to be able to set up a Raspberry Pi so that I can stop the rotations at a specific count, as well as set that count stop number using some kind of rotary encoder. This would necessitate another display as well, showing the pre-programmed revolutions before stop as set by turning the rotary encoder. Is this possible? This set up wraps electric coils, and I need to be able to program the wraps and have it stop when it reaches a specific number which varies from time to time. Any help would be GREATLY appreciated. I'm very new to Raspberry Pi, Linux, and coding.
To see what I'm trying to control: https://www.youtube.com/watch?v=F2Z8fdwFkLQ