https://ncrmnt.org/2010/11/22/first-take-on-a-dc-motor-controller/
First take on a DC motor controller.