Arduino sketch to drive an extruder for a FDM 3D printer fitted with a DC motor and quadrature encoder with step / direction signals like it is a stepper motor. Based on https://github.com/cswiger/dcservodrive
Requires libraries:
FlexiTimer2.h http://playground.arduino.cc/Main/FlexiTimer2
PID_v1.h http://playground.arduino.cc/Code/PIDLibrary
Encoder.h http://playground.arduino.cc/Main/RotaryEncoders
Dev build on mega. ultimatly will be for pro mini