Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Accelerometer (http://www.chiefdelphi.com/forums/showthread.php?t=73674)

dnrobotics11 05-02-2009 15:49

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

dnrobotics11 05-02-2009 17:09

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.

byteit101 05-02-2009 21:17

Re: Accelerometer
 
for us,
AnalogChannel ac(1);
ac.GetValue();

dnrobotics11 05-02-2009 22:57

Re: Accelerometer
 
How did you intialize the "ac" variable? Is that all you have to do?

byteit101 06-02-2009 06:24

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

dnrobotics11 06-02-2009 18:27

Re: Accelerometer
 
okay cool thanks a lot


All times are GMT -5. The time now is 02:39.

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