View Single Post
  #21   Spotlight this post!  
Unread 13-01-2008, 05:33
pafwl pafwl is offline
Franciose
AKA: Frank Larkin
FRC #0272 (Cyber Crusaders)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 1998
Location: Lansdale, Pennsylvania
Posts: 108
pafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud ofpafwl has much to be proud of
Re: Help, I'm a world class computer programming genius yet I'm totally lost.

PWM
Pulse Width Modulated output.(byte) Range 0-255, mid range =127. Joystick output. This applies to Speed controller via a control cable (White, red, black). This tells Speed controller how much voltage and polarity. (forward or reverse). You assign joystick value to pwm output.

pwm01 = p3_y; // left driver joystick



Relay
Separate module connected via control cable to Spike Relay controller.
Has two variables _fwd _rev. When controlling motor it will apply full power in foward or reverse.
relay1_fwd = 1;
relay1_rev = 0;

To turn it all off ...
relay1_fwd = 0;
relay1_rev = 0;


Once you compile your code you must download it to micro. Go ti IFI for loader and instructions. Ther eis a default code base that helps get you started.