Go to Post they just build excellence and silently wait to deploy their creation on the unsuspecting masses - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
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 10-01-2012, 20:39
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
ADXL345 Accelerometer Troubles (examples give errors)

For some reason (being mainly my own stupidity) we never tried to use an accelerometer before kickoff for practice. As it turns out it's a vital part of what we're planning to do (No bonus points if you guess - it's too obvious!), so it certainly doesn't help that nothing I try to do works.


We're using a cRIO-FRC2. We have the digital sidecar connected to the digital module on slot 2, and we connected the ADXL345 accelerometer to the sidecar exactly as shown in the examples. We have tried both examples (I2C and SPI) several times, and neither worked. We've also tried two different accelerometers, both reacting the same.
We've checked, double-checked, triple-checked, and then checked a bunch more times - everything is connected correctly. I am completely baffled as to why it's not working.

When we run the I2C example, it spits up an error, immediately stopping the VI. I'm afraid I can't copy-paste it at this moment, but generally (from memory): it expected something like "Address 58" (not 100% sure about the number) but instead received "The sensor did not respond" (or something to that effect). The error text then goes on about the error code being undefined, and the rest of that annoyingly long message. Error code was was -44xxx (xxx being your best guess!)
I tried to go deeper and see the source of the error. I've found the oddest thing - a devref entering a Read VI was probed error-free, but when probing the input when going inside the read VI, it has the error in it.


The SPI example, on the other hand, DOES run, but returns 0 for all axis's at all times. I made sure that earth's gravity was in fact turned on, and even tried moving the sensor myself - it did not output anything. We've given this one less attempts though.


I am not a very experienced programmer but I'm skilled enough so you don't have to dumb down your replies for me.



Side question: Is either protocol better than the other for the accelerometer? For what reason?
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 19:52.

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