Go to Post P.S. Who doesn't have CD as there homepage! (I mean, come on people. It's not like there's anything else to do on the net... :)) - Ryan M. [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 06-03-2010, 21:46
nedrobotics's Avatar
nedrobotics nedrobotics is offline
Scott Jewell - Team 1584
AKA: Fleet Admiral Jewell
FRC #1584 (Nederland Pirates)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2004
Location: Nederland, CO, USA
Posts: 5
nedrobotics is an unknown quantity at this point
C++ I2C Accelerometer - Can't send power

We have recently installed the 2010 Accelerometer (ADXL345) on our robot and have the new ADXL345 class code in Windriver. But whenever we try to read values from it, they all read 0. We believe this is because according to the FIRST Sensor Manual, “The ADXL345 starts in a power saving mode. You must turn it on by writing 0x08 to POWER_CTL (0X2D) before it will do anything interesting.”

We are not sure how to write any values to the I2C class to turn on the accelerometer. We tried accessing the write function from the I2C class through the ADXL345_I2C class and using it within the main robot class, but then the code would not compile. What syntax would we use to write the value "0x08" to the POWER_CTL and turn on the accelerometer?
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2010 Accelerometer I2C Object/Class NerdGuy Java 32 12-02-2011 10:19
Help with 2010 Accelerometer & I2C wt200999 C/C++ 33 08-02-2010 15:16
i2c output virtuald Programming 16 18-01-2009 19:20
Help! Can't send files to NXT Brick via bluetooth Raptorace22 National Instruments LabVIEW and Data Acquisition 0 24-11-2008 16:39
I2C? John Gutmann Electrical 3 19-07-2005 22:52


All times are GMT -5. The time now is 13:04.

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