Go to Post Come on guys....what else could we expect.....its Wildstang!!! - Kyle Love [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 05-02-2009, 15:49
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Accelerometer

Okay I found the doxygen documentation for the accelerometer but it is very inspecific regarding the WindRiver code. Could anyone tell me all of the syntax and functions in WindRiver for the accelerometer? Thank you
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2009, 17:09
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Accelerometer

The code given doesn't seem to build in WindRiver. I just need to know what the main functions are to get the horizontal value from the accelerometer. Thanks a lot.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2009, 21:17
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Accelerometer

for us,
AnalogChannel ac(1);
ac.GetValue();
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2009, 22:57
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Accelerometer

How did you intialize the "ac" variable? Is that all you have to do?
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2009, 06:24
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Accelerometer

yes, to initialize a variable you can do this:
Type name(params);
RobotDrive myRobot(1,2);
myRobot.Drive(1,0):
or
Type* name = new Type(poarams);
RobotDrive* myRobot = new RobotDrive(1,2);
myRobot->Drive(1,0);
and in the destructor
delete myRobot;

I reccomend the first way
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2009, 18:27
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Accelerometer

okay cool thanks a lot
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
Accelerometer Code Smoking_Gun Programming 6 24-01-2007 13:57
Accelerometer integration Leav Programming 4 27-01-2006 11:56
Accelerometer railerobotics Programming 1 27-01-2006 02:59
Accelerometer Tom McCurdy Programming 5 30-01-2005 23:45
Accelerometer buss Electrical 1 09-01-2005 00:10


All times are GMT -5. The time now is 17:54.

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