View Full Version : Accelerometer
dnrobotics11
05-02-2009, 15:49
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
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
for us,
AnalogChannel ac(1);
ac.GetValue();
dnrobotics11
05-02-2009, 22:57
How did you intialize the "ac" variable? Is that all you have to do?
byteit101
06-02-2009, 06:24
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
okay cool thanks a lot
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.