View Single Post
  #4   Spotlight this post!  
Unread 12-02-2008, 18:03
Boydean's Avatar
Boydean Boydean is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Apr 2007
Rookie Year: 2003
Location: SC
Posts: 319
Boydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant future
Send a message via AIM to Boydean
Re: pwm controlled by relay

We have to do the same thing, but we have to have the motor turn one direction all the time and the other only when the button is pressed.

Code:
if(p2_sw_aux1 == 1)
	{
		relay1_fwd = 1;
		relay1_rev = 0;
	}
else
	{
		relay1_fwd = 0;
		relay1_rev = 1;
	}
__________________