Go to Post Sometimes the team really needs the kid, and sometimes the kid really needs the team. - Taylor [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-12-2013, 06:41 PM
progal's Avatar
progal progal is offline
Programmer
AKA: Shelby
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Glen Allen
Posts: 15
progal is an unknown quantity at this point
Accelerometer Code Making Robot Stop Moving

Hey, apologies if this is an already answered question. I couldn't find anything on the topic.
The problem that we're having is whenever we state the accelerometer (not even doing anything with it, but just instantiating it), our robot components stop working completely. The robot won't move, et cetera.

Also, we don't know how to get the values from the gyro once in teleop, or rather the method to use to get the values from the accelerometer.

This is our code:
Code:
class RobotDemo : public SimpleRobot
{
        RobotDrive myRobot; // robot drive system
	Joystick stick1, stick2; // only joystick
	ADXL345_SPI adxl;
Code:
public:
	RobotDemo(void):
		myRobot(2, 1),	// these must be initialized in the same order
		stick1(1),		// as they are declared above.
		stick2(2),
		adxl(5, 6, 7, 8, ADXL345_SPI::kRange_2G)
Thanks in advance!
__________________

C++ Programmer
Reply With Quote
 


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


All times are GMT -5. The time now is 10:00 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