Had to take the greater and less than symbols out for YouTube to like it.
//Subproject 3
//Tim
#include pololu/3pi.h
int main()
{
print("PRESS B");//has user press button B to execute program
while(1)
{
wait_for_button(BUTTON_B);
delay_ms(500);//waits for half second
set_motors(50,-50);
delay_ms(400);//robot turns right 90 degrees
set_motors(0,0);
delay_ms(2000);//robot stops for 2 seconds
set_motors(50,-50);
delay_ms(400);//robot turns right 90 degrees
set_motors(0,0);//robot stops
}
return 0;
}
Link to this comment:
All Comments (0)