Quote:
|
Originally Posted by reilly
Our team needs to know if there is already solenoid control in the FRC_default.hex. As is- what will the code do?
|
The FRC_default.hex and the default code v2.2 are both setup to do the following with the pneumatic solenoids.
Code:
relay1_fwd = p1_sw_trig & rc_dig_in01; /* FWD only if switch1 is not closed. */
relay1_rev = p1_sw_top & rc_dig_in02; /* REV only if switch2 is not closed. */
relay2_fwd = p2_sw_trig & rc_dig_in03; /* FWD only if switch3 is not closed. */
relay2_rev = p2_sw_top & rc_dig_in04; /* REV only if switch4 is not closed. */
relay3_fwd = p3_sw_trig;
relay3_rev = p3_sw_top;
relay4_fwd = p4_sw_trig;
relay4_rev = p4_sw_top;
relay5_fwd = p1_sw_aux1;
relay5_rev = p1_sw_aux2;
relay6_fwd = p3_sw_aux1;
relay6_rev = p3_sw_aux2;
relay7_fwd = p4_sw_aux1;
relay7_rev = p4_sw_aux2;
For instance, pulling the trigger button on a joystick plugged into the OI Port 4 will trigger a solenoid connected to the spike connected to the RC relay4 output.
The "aux" buttons are the ones to either side of the large "hat" button at the top of the joystick. the "top" button is the thumb button on the joystick.
You don't need any additional header files.