This program is an example of how to set the power on your motors.  

All motors are not created equal and might run at different speeds even if they are brand new!

 

Meet Motor Power Control Program number 1! This bad boy motor commander first selects Motor Port A and sets it to 90% power.  It then selects Motor Port B and sets it to 65% power.  It then selects both Motor Ports A and B and turns them both on for 2 seconds (the number represents 10ths of a second).

 

Motor program two is an interesting little number, can you predict what it will do?   It first selects Motor Port B and sets the power to only 36%.   It then selects both Ports A and B and turns them on for 2 seconds.  What do you think will happen?   Hint: If you do not use the Set Power command on a particular port, the port defaults to 100% power.

 

Motor program three is a challenge in efficiency for you.  Programmers are always thinking about how to create code that is more efficient and uses fewer commands to accomplish the required goal.  Take a look at this program carefully – based on what you have learned in programs one and two, can you rewrite this program to use fewer commands and accomplish the same thing?