davelu
22-12-2005, 22:38
Hey
I tried googling around for help and this forum but i just couldn't find it... In ifi_aliases.h in what part of the program does it define the controls? returning the analog values of the analog joystick?
is it this? Cuz last year was p1_y p1_x it was quite obvious... .... sorry i'm a bit slow on this :D help would be apperieated...
I'm using MPLAB IDE rather than easy c (For Vex Programming) And the controllers i'm talking about are the ones that came with the vex robotics kit....
#define PWM_in1 rxdata.oi_analog01
#define PWM_in2 rxdata.oi_analog02
#define PWM_in3 rxdata.oi_analog03
#define PWM_in4 rxdata.oi_analog04
#define PWM_in5 rxdata.oi_analog05
#define PWM_in6 rxdata.oi_analog06
#define PWM_in7 rxdata.oi_analog07
#define PWM_in8 rxdata.oi_analog08
#define PWM_in9 rxdata.oi_analog09
#define PWM_in10 rxdata.oi_analog10
#define PWM_in11 rxdata.oi_analog11
#define PWM_in12 rxdata.oi_analog12
if so would it be somehing liek this if i do a four wheel drive using one anlog stick
pwm1=pwm2=pwm3=pwm4=pwm_in1;
if ( pwm_in2 < 127){
pwm1=pwm2=pwm_in2;
pwm3=pwm4=255-pwm_in2;
}
else if ( pwm_in2>127)
{
pwm3=pwm4=pwm_in2;
pwm1=pwm2=255-pwm_in2;
}
I tried googling around for help and this forum but i just couldn't find it... In ifi_aliases.h in what part of the program does it define the controls? returning the analog values of the analog joystick?
is it this? Cuz last year was p1_y p1_x it was quite obvious... .... sorry i'm a bit slow on this :D help would be apperieated...
I'm using MPLAB IDE rather than easy c (For Vex Programming) And the controllers i'm talking about are the ones that came with the vex robotics kit....
#define PWM_in1 rxdata.oi_analog01
#define PWM_in2 rxdata.oi_analog02
#define PWM_in3 rxdata.oi_analog03
#define PWM_in4 rxdata.oi_analog04
#define PWM_in5 rxdata.oi_analog05
#define PWM_in6 rxdata.oi_analog06
#define PWM_in7 rxdata.oi_analog07
#define PWM_in8 rxdata.oi_analog08
#define PWM_in9 rxdata.oi_analog09
#define PWM_in10 rxdata.oi_analog10
#define PWM_in11 rxdata.oi_analog11
#define PWM_in12 rxdata.oi_analog12
if so would it be somehing liek this if i do a four wheel drive using one anlog stick
pwm1=pwm2=pwm3=pwm4=pwm_in1;
if ( pwm_in2 < 127){
pwm1=pwm2=pwm_in2;
pwm3=pwm4=255-pwm_in2;
}
else if ( pwm_in2>127)
{
pwm3=pwm4=pwm_in2;
pwm1=pwm2=255-pwm_in2;
}