Go to Post do i even have to say anything about hurricane jeanne after my comments about charley, frances and ivan? :mad: but if i could, i would run all of them over with my robot... - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-17-2009, 06:52 PM
FearlessLeader FearlessLeader is offline
Registered User
AKA: James Wittel
FRC #2753 (Team Overdrive)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2003
Location: NJ
Posts: 6
FearlessLeader is an unknown quantity at this point
Reading Joystick Values Help

I need to get the value off the X axis on Joystick(1) the value being 0-256
I need to put the value into a float(JoyStick1Value)

How do I do this code please if you can

Thanks
__________________
Team Overdrive #2753 - FRC 2008/2009

FTC 2007/2008 world champions!
New Brunswick Eruption - Future Glory Award
Attending NJ Regional
Attending NYC Regional

www.teen-technology.org
www.JPEX-studios.com
www.team-overdrive.com
Past: FTC #74, FVC #3179
Reply With Quote
  #2   Spotlight this post!  
Unread 01-17-2009, 07:12 PM
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 321
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Reading Joystick Values Help

Look in BaeUtilities.h the NormalizeToRange() function
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #3   Spotlight this post!  
Unread 01-17-2009, 09:33 PM
FearlessLeader FearlessLeader is offline
Registered User
AKA: James Wittel
FRC #2753 (Team Overdrive)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2003
Location: NJ
Posts: 6
FearlessLeader is an unknown quantity at this point
Re: Reading Joystick Values Help

#include "WPILib.h"
#include <Joystick.h>

class RobotDemo : public SimpleRobot
{
RobotDrive MyRobot;
Joystick RightStick;
Joystick LeftStick;

public:
RobotDemo(void):
MyRobot(1, 2),
RightStick(1),
LeftStick(2)

{
GetWatchdog().SetExpiration(100);
}

void Autonomous(void)
{

}

void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())

{
RightStick.GetX(); //this is what i need help with
}
}
};

START_ROBOT_CLASS(RobotDemo);


I know i use this but RightStick.GetX(); where do i put the float to get the value
__________________
Team Overdrive #2753 - FRC 2008/2009

FTC 2007/2008 world champions!
New Brunswick Eruption - Future Glory Award
Attending NJ Regional
Attending NYC Regional

www.teen-technology.org
www.JPEX-studios.com
www.team-overdrive.com
Past: FTC #74, FVC #3179
Reply With Quote
  #4   Spotlight this post!  
Unread 01-17-2009, 11:08 PM
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 321
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Reading Joystick Values Help

What are you trying to do with it?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #5   Spotlight this post!  
Unread 01-17-2009, 11:13 PM
Alexa Stott's Avatar
Alexa Stott Alexa Stott is offline
All I do is twin.
AKA: elixir
FRC #0025 (Raider Robotix)
Team Role: College Student
 
Join Date: Oct 2005
Rookie Year: 2006
Location: No. Bruns., NJ/College Park, MD
Posts: 781
Alexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond repute
Send a message via AIM to Alexa Stott
Re: Reading Joystick Values Help

Are you talking about doing smething like:
float variablename = stick.GetX();?

I don't really undestand what you are specifically trying to do.
__________________
|Email:alexastott[at]gmail.com|Facebook|@zelixir|Google+|
[University of Maryland Computer Science, Psychology]
[Brunswick Eruption]
Reply With Quote
  #6   Spotlight this post!  
Unread 01-17-2009, 11:33 PM
FearlessLeader FearlessLeader is offline
Registered User
AKA: James Wittel
FRC #2753 (Team Overdrive)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2003
Location: NJ
Posts: 6
FearlessLeader is an unknown quantity at this point
Re: Reading Joystick Values Help

I am sorry i figured it out
(float) = RightStick.GetX();
__________________
Team Overdrive #2753 - FRC 2008/2009

FTC 2007/2008 world champions!
New Brunswick Eruption - Future Glory Award
Attending NJ Regional
Attending NYC Regional

www.teen-technology.org
www.JPEX-studios.com
www.team-overdrive.com
Past: FTC #74, FVC #3179
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joystick values (?) beefy1 Programming 1 12-23-2008 11:26 AM
Joystick axis values in new controller koreabell Programming 7 12-17-2008 11:39 AM
Joystick Output Values? compwiz2008 Programming 5 01-17-2008 10:40 PM
Mixing Joystick Values for mecanum wheels Leav Programming 10 01-15-2006 02:51 PM
Need Help reading PDF files Tton General Forum 6 02-14-2003 05:43 PM


All times are GMT -5. The time now is 10:14 AM.

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