Arduino-Advanced R&D Motor Optimization

 

Motor Configuration 1

//motor 1 run at 30%power for 8 seconds

motorSpeed(1,30);

goFor(8);

//decelerate motor 1 from 30% to 20% in 4 seconds

celerate(1,30,20,4);

//brake motor 1 for 4 seconds

brake(1);

goFor(4);

//reverse motor 1

reverse(1);

//accelerate motor 1 from 20% to 45% in 2 seconds

celerate(1,20,45,2);

// motor 1 run at 45% for 6 seconds

motorSpeed(1,45);

goFor(6);

//decelerate motor 1 from 45% to 30% in 4 seconds

celerate(1,45,30,4);

//brake motor 1

brake(1);

 

Motor Configuration 2

//motor 1 run at 35% power for 5 seconds

motorSpeed(1,35);

goFor(5);

//decelerate motor 1 from 35% to 20% in 4 seconds

celerate(1,35,20,4);

//brake motor 1 for 5 seconds

brake(1);

goFor(5);

//reverse motor 1

reverse(1);

//accelerate motor 1 from 20 to 45% in 2 seconds

celerate(1,20,45,2);

//motor 1 run at 45% for 5 seconds

motorSpeed(1,45);

goFor(5);

//decelerate motor 1 from 45% to 30% in 4 seconds then brake motor 1

celerate(1,45,30,4);

brake(1);

 

Motor Configuration 3

//motor 1 run at 40% for 5 seconds

motorSpeed(1,40);

goFor(5);

//decelerate motor 1 from 35% to 20% in 4 seconds

celerate(1,35,20,4);

//brake motor 1 for 5 seconds

brake(1);

goFor(5);

//reverse motor 1

reverse(1);

//accelerate motor 1 from 20% to 45% ub 2 seconds

celerate(1,20,45,2);

//motor 1 run at 50% for 3 seconds

motorSpeed(1,50);

goFor(3);

//decelerate motor 1 from 50% to 30% in 4 seconds then brake

celerate(1,50,30,4);

brake(1);

 

Motor Configuration 4

// run motor speed at 40% for 4.2 seconds

motorSpeed(1,40);

goFor(4.2);

//decelerate motor 1 from 35% to 20% in 4 seconds

celerate(1,35,20,4);

//brake motor 1 for 5 seconds

brake(1);

goFor(5);

//reverse motor 1

reverse(1);

//accelerate motor 1 from 20%to 45% in 2 seconds

celerate(1,20,45,2);

//run motor 1 at 40% for 5.7 seconds

motorSpeed(1,40);

goFor(5.7);

//decelerate motor 1 from 40% to 30 % in 4 seconds then brake

celerate(1,40,30,4);

brake(1);