Esempio n. 1
0
void moveForward()
{
	clearModes();
	TA0CCR1 = 50;
	TA1CCR1 = 50;
	TA1CCTL1 |= OUTMOD_7; //reset/set
	TA0CCTL1 |= OUTMOD_7; //reset/set
	__delay_cycles(900000);
	clearModes();
}
Esempio n. 2
0
void turnBigLeft()
{
	clearModes();
	TA0CCR1 = 30;
	TA1CCR1 = 30;
	TA1CCTL1 |= OUTMOD_5;        // set TACCTL1 to Reset / Set mode
	TA1CCTL0 |= OUTMOD_7;		 // set TACCTL0 to Reset

	TA0CCTL1 |= OUTMOD_7;
	__delay_cycles(300000);
	clearModes();
}
Esempio n. 3
0
void turnSmallRight()
{
	clearModes();
	TA0CCR1 = 30;  //30%duty cycle, just to slow things down a bit
	TA1CCR1 = 30;
	TA0CCTL1 |= OUTMOD_5;        // set TACCTL1 to Reset mode
	TA0CCTL0 |= OUTMOD_7;		 // set TACCTL0 to Reset/Set

	TA1CCTL1 |= OUTMOD_7; //reset/set
	__delay_cycles(200000);
	clearModes();
}
Esempio n. 4
0
void moveBackward()
{
	clearModes();
	TA0CCR1 = 5;  //this is because backward moves super fast
	TA1CCR1 = 5;
	TA1CCTL1 |= OUTMOD_5;        // set TACCTL1 to Reset mode
	TA1CCTL0 |= OUTMOD_7;		 // set TACCTL0 to Reset/Set
	TA0CCTL1 |= OUTMOD_5;        // set TACCTL1 to Reset mode
	TA0CCTL0 |= OUTMOD_7;		 // set TACCTL0 to Reset/Set
	__delay_cycles(500000);
	clearModes();
}
Esempio n. 5
0
void turnSmallLeft()
{
	clearModes();
	TA0CCR1 = 30;
	TA1CCR1 = 30;
	TA1CCTL1 |= OUTMOD_5;
	TA1CCTL0 |= OUTMOD_7;

	TA0CCTL1 |= OUTMOD_7;
	__delay_cycles(200000);
	clearModes();
}
Esempio n. 6
0
void turnBigRight()
{
	clearModes();
	TA0CCR1 = 30;
	TA1CCR1 = 30;
	TA0CCTL1 |= OUTMOD_5;        //Reset
	TA0CCTL0 |= OUTMOD_7;		 //TACCTL0 to Reset/Set

	TA1CCTL1 |= OUTMOD_7; //reset/set
	__delay_cycles(300000);
	clearModes();
}
Esempio n. 7
0
void turnSmallRight()
{
	clearModes();
	TA0CCR1 = 30;
	TA1CCR1 = 30;
	TA0CCTL1 |= OUTMOD_5;        // TACCTL1 Reset mode
	TA0CCTL0 |= OUTMOD_7;		 // TACCTL0 Reset/Set

	TA1CCTL1 |= OUTMOD_7; //reset/set
	__delay_cycles(200000);
	clearModes();
}
Esempio n. 8
0
void moveBackward()
{
	clearModes();
	TA0CCR1 = 5;
	TA1CCR1 = 5;
	TA1CCTL1 |= OUTMOD_5;
	TA1CCTL0 |= OUTMOD_7;
	TA0CCTL1 |= OUTMOD_5;
	TA0CCTL0 |= OUTMOD_7;
	__delay_cycles(500000);
	clearModes();
}