Hey all, I've got a project going where I'm making a PID controlled DC motor using the TM4C1294NCPDT LaunchPad. The idea is to send a set point to the DC motor, whether it be a certain velocity (rpm) or a certain position (in degrees), and the motor will attempt to follow this profile with the implementation of a PID controller. So far, I've completed the code which will drive my motor, which is shown below. This also allows a potentio meter to change the duty cycle, simply to show it is working, and will not be used in the final code.
To interpret the velocity and direction of the DC mo