|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
||||
|
||||
|
Re: pwm controlled by relay
You could use static variables to achieve these means.
Code:
static unsigned char Tank_Drive = 1; //default is tank drive
if (p1_sw_trig) Tank_Drive = 1; // enable tank drive
else if (p1_sw_aux1) Tank_Drive = 0; // enable other drive system
if(Tank_Drive)
{
// code for tank drive here
}
else
{
// code for other drive system here
}
Last edited by usbcd36 : 12-02-2008 at 21:30. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Silicon Controlled Rectifier | teh_pwnerer795 | Electrical | 37 | 26-11-2007 07:09 |
| Guage of PWM/Relay Cables | Jake M | Electrical | 2 | 07-02-2007 00:49 |
| PC Controlled Robot | EHaskins | Programming | 6 | 05-11-2006 06:45 |
| Servos controlled by RC? | Obi | Programming | 5 | 01-02-2005 14:43 |
| relay and pwm outputs | nick_champ_2 | Electrical | 1 | 31-01-2003 13:08 |