Go to Post I told myself I'd stay out of the obsession this year, but I couldn't resist... - Grant Cox [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
  #2   Spotlight this post!  
Unread 13-02-2013, 06:58
kenfox kenfox is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Ann Arbor, MI
Posts: 51
kenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of light
Re: Accelerometer Code Making Robot Stop Moving

Quote:
Originally Posted by progal View Post
whenever we [instantiate] the accelerometer ... our robot components stop working completely.

Code:
adxl(5, 6, 7, 8, ADXL345_SPI::kRange_2G)
The constructor for ADXL345_SPI takes the digital IO module as the first parameter and has a default kRange_2G value for the 6th parameter. You are asking it to use a non-existant module #5 which probably causes the robot code to crash. Do you see an error message about using a module out of range?

If you only have one digital IO module in the cRIO, it will be module #1.

Does the following code work better?

Code:
adxl(1, 5, 6, 7, 8)
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 18:23.

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