Go to Post This whole experience, the entirety of what FIRST represents and promotes, is about inspiring individuals to make something more of themselves and creating a better world; when you consider this, our individual victories seem meaningless. - Dillon Compton [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 03-02-2014, 12:26
TechWarlock TechWarlock is offline
Programming Dude
AKA: Jacob
FRC #1396 (Pyrobots)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2011
Location: New York
Posts: 24
TechWarlock is an unknown quantity at this point
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
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi