|
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.
|