Quote:
|
Originally Posted by stephenthe1
thanks guys. actually, I found out in this thread that the Get_Left_Encoder_Count() function sends its returned value to the "Left_Encoder_Count" variable, which IS static. therefore I don't need the (poorly named) "lec" (left encoder count, but left count is being used for the arm this time, with the tick delta set to +1).
however, all I need for the compressor is to turn it on, but thanks for the wheel idea, as I'll try that out. It'll make testing more practical. thanks again!
|
Don't use the wheel input to control the compressor! The pressure switch output is open (0) when the pressure drops below a threshold, then closes (1)when it hits 120 psi. It stays closed (1) until the pressure drops below the threshold again. That means there is no logic involved in turning the compressor on and off, just grab the value from the switch. Its right there in Default_Routine(). The compressor is connected to relay 8 and the pressure switch to digital input 18:
Code:
relay8_fwd = !rc_dig_in18; /* Power pump only if pressure switch is off. */
relay8_rev = 0;