added motor control code for door opening project