Write a program that receives as input a 3x3 array. The first two columns are the left and right motor power respectively, the last column is the time during which the power is apply to the motors. Your program has to read each row in sequence and for each row the robot has to apply power to the motors according to columns 1 and 2 and maintain this value for duration stated in column 3. Example input:
int[][] command = {
{ 80, 60, 2},
{ 60, 60, 1},
{-50, 80, 2}
};
row1: During the 1st 2 seconds motor one and motor two are powered with 80% and 60% of their max capacity
row2: During the 3rd second motor one and two are powered with 60% and 60% of their max capacity
row3: During seconds 4 and 5 motors one and two are powered with -50% and 60% of their max capacity (the minus means change in rotation direction)
After it is done executing all three rows the robot has to transmit its location and orientation to the PC and/or show it in the display. Make sure you add some lego blocks structure to be able to align your robot with the (0,0) coordinate reference frame. Describe your implementation in detail in your report. Run the program at least 3 times (on the above input), collect data (draw the trajectory on paper) and include an error analysis in your report with photos.