Thread
:
pwm controlled by relay
View Single Post
#
4
12-02-2008, 18:03
Boydean
The Blue Alliance
no team
Team Role: Alumni
Join Date: Apr 2007
Rookie Year: 2003
Location: SC
Posts: 319
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; }
__________________
twitter
|
github
Boydean
View Public Profile
Find all posts by Boydean
Find CD-Media Photos by Boydean
Find CD-Media Papers by Boydean