|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
|||
|
|||
|
Re: Solenoid Breakout Code Help
the 8 is supposed to represent the slot we put the NI 9472 into, and yeah we are using a double solenoid
class RobotDemo : public SimpleRobot { RobotDrive Frankbot; // robot drive system Joystick leftjoy; Joystick rightjoy; Joystick joystick3; Jaguar Flipper; Relay piston1; Relay Arm; // PistonHelper Relay PistonHelper; //Actual Arm Solenoid sol1; Solenoid sol2; // Jaguar Winch; public: RobotDemo(void): Frankbot(1, 2), //these are the PWM ports leftjoy(1), rightjoy(2), joystick3(3), Flipper(7), piston1(6), Arm (5), PistonHelper (8), sol1(3, 1), sol2(3, 2) public: RobotDemo(void): sol1(3, 1), sol2(3, 2) if(leftjoy.GetRawButton(sol)){ sol1.Set(true); sol2.Set(false); } else if(leftjoy.GetRawButton(sol4)){ sol2.Set(true); sol1.Set(false); } else { sol1.Set(false); sol2.Set(false); } i made some adjustments, but the code still doesnt work |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|