Question: Question 2: (50) A 4-phase stepper motor, with a step angle of 1.5, is connected to port C of the Arduino mega board. The phases

Question 2: (50) A 4-phase stepper motor, with a step angle of 1.5, is connected to port C of the Arduino mega board. The phases are connected to pins 0,1,2,3 of PORTB. We intend to write the code to control the rotation of the motor c The binary sequence to make the motor rotate CW is given in the table below. The most significant bit corresponds to phase 1. Each time a code is sent to the motor, the system needs a certain delay before accepting the next sequence Assume a function delay(time) exists, and generates a delay in milliseconds. motor rotates CW 1001 1000 1100 0100 0110 0011 0001 0101 1100 1101 . Assuming the desired speed is 101 rotations per minute, write the code necessary to make the motor rotate continuously counter clockwise at this speed (15) 2. We want to use the keypad in question 1 to control the motor as per the following keys 2 and 8 to increase or decrease the speed of the motor, and keys 4 and 6 to change the direction of rotations (CW vs CCW). Write the necessary code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
