Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Aux 1 & 2 (http://www.chiefdelphi.com/forums/showthread.php?t=53992)

WGRAY 12-02-2007 14:49

Aux 1 & 2
 
What function blocks, and what steps do I take to get the aux 1 and aux 2 button on my joysticks to signal my pwm outputs?:confused:

Imajie 12-02-2007 14:59

Re: Aux 1 & 2
 
Assuming you're using EasyC you want to add something like this to your Operator_Control function
Code:

if(GetOIDInput([joystick port], [button]) == 1){
    //Button pressed so drive motor
    SetPWM([port], [value]);
}
else{
    //Button not pressed stop motor
    SetPWM([port], 127);
}

I believe that 3 and 4 are the numbers for the aux1 and 2 but I could be wrong.


All times are GMT -5. The time now is 04:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi