A System for Speed and Torque Control of DC Motors with Application to Small Snake Robots