Go to Post FIRST MANTRA: When Lawyer-ism fails, Gracious Professionalism Prevails! - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2014, 16:18
tinybob20 tinybob20 is offline
Registered User
AKA: Jeremy
FRC #1559 (DevilTech)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Victor
Posts: 18
tinybob20 is an unknown quantity at this point
Question Working with the ADXL345

Hi,

Our team has been trying to implement a ADXL345 accelerometer to use for a PID-controlled drive system. We tried to talk to to it over the basic I2C class, but it returned weird values when we moved it (30,-30,40,-40, etc). We tried to use the ADXL345_I2C class, but we couldn't even get it to return a value. Is there a special way this sensor needs to be created or set up? (if we can get it to work just using the basic I2C, we would be pretty happy.)

Any help appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-01-2014, 16:49
cgmv123's Avatar
cgmv123 cgmv123 is online now
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,078
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
We've never had much success with the WPILib ADXL345_I2C class. I don't know if this one was tested thoroughly, but it should work better.

https://github.com/team1306/Badgerbo...erometer2.java

You'll need this class as well: https://github.com/team1306/Badgerbo...lib/Point.java
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
Reply


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 22:34.

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