Quote:
Originally Posted by team877
here is our code you asked for....
Code:
void operatorControl ( void )
{
unsigned char x;
while ( 1 )
{
SetPwm ( 2 , x ) ; // We’re setting are variable to the motor we want it to measure
if ( 125 < x && x < 129 )
{ // We want this relay to engage between these speeds
SetRelay ( 1 , 1 , 0 ) ;
}
else
{ // And if not turn the relay off
SetRelay ( 1 , 0 , 0 ) ;
}
}
}
|
I don't see anything that sets the value of
x. Did you forget the line that reads the joystick value?
(Is there a reason you posted it as a Word document containing a picture, instead of just copying the text? I don't use Word, and it was inconvenient to convert your file to a readable form.)