https://deepbluembedded.com/dc-motor-speed-control-l293d-motor-driver/
DC Motor Speed Control With PIC Microcontroller PWM And L293D