View Single Post
  #13   Spotlight this post!  
Unread 21-01-2012, 15:45
sand500 sand500 is offline
Registered User
FRC #3540 (Wildcat Robotics)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: United States
Posts: 81
sand500 is an unknown quantity at this point
Re: Accelerometer Showing All Zeros

this is what we are using for the code:

Code:
ADXL345_I2C acll= new ADXL345_I2C(2,ADXL345_I2C.DataFormat_Range.k8G);
public void teleopPeriodic()
	{	
		hi1 = acll.getAcceleration(ADXL345_I2C.Axes.kX);
		hi2 = acll.getAcceleration(ADXL345_I2C.Axes.kY);
		hi3 = acll.getAcceleration(ADXL345_I2C.Axes.kZ);
                disp(1, "" + hi1 + "                        ");
		disp(2, "" + hi2 + "                        ");
		disp(3, "" + hi3 + "                        ");
        }
disp is a custom method we made to output to the DS LCD
but this gives us just all 0

We also have the accelerometers plugged into the the 2 sets of 4 pins next to the "phone jack".

Last edited by sand500 : 21-01-2012 at 16:22.
Reply With Quote