Generating PWM from PID to control DC motor

  1. download the PID library and study the documentation
  2. try the Basic Example