sample code for a DC Motor in embedded systems interrupts lecture