Data Analysis Tool

Plots

Energy vs. Distance Plot

Energy vs. Time Plot

Code Associated to Graphs

reverse(4);

celerate(4,0,25,3);

motorSpeed(4,25);

goFor(1);

motorSpeed(4,20);

goFor(2);

reverse(4);

motorSpeed(4,25);

goFor(2);

brake(4);

Graph Correlation with Code

Both graphs initially begin with a spike due to the reverse code for the motors to go the correct way. Based on the polarity of the motors, we must use the reverse code. As the code progresses the jump in both graphs this is due to the acceleration code listed as ‘celerate(4,0,25,3); ‘ which states that all the motors must accelerate from 0 to 25% power for 3 seconds. After this, The graphs show a plateau due to the motor speed being kept constant at 25% for 1 second. Additionally, the code shows how the motorSpeed is reduced to 20% for all motors and continues for 2 seconds. After this plateau, the graphs shoot up again due to the command in the code which states it needs to reverse all motors to 25% and continue onwards for 2 seconds. After this increase and plateau, the motors drop immediately to 0% power due to the brake command.