You have to create two subroutines called "goforward" and "goright". The "goforward" subroutine will run the robot forward for 500 ms and the "goright" subroutine turns the robot to the right by during 500 ms. "goforward" has to set pins B.1 and B.2 to ON and pause for 500 ms before returning. "goright" has set pin B.1 ON and in B.2 OFF and pause for 500 ms before returning. Write the program using PICAXE programming editor and by selecting "PICAXE-18M2". You have to configure an input that is connected to the bump switch. The input should be an interrupt-enabled one such as C.7. Provide a screenshot showing the program code and the correct execution in the case where there is no interrupt and when there is an interrupt.
You have to create two subroutines called "goforward" and "goright". The "goforward" subroutine will run the robot forward for 500 ms and the "goright" subroutine turns the robot to the right by during 500 ms. "goforward" has to set pins B.1 and B.2 to ON and pause for 500 ms before returning. "goright" has set pin B.1 ON and in B.2 OFF and pause for 500 ms before returning. Write the program using PICAXE
Step by step
Solved in 3 steps