Embedded systems code for implementing Double Inverted Pendulum control using an ARM Cortex R4f processor