![]() |
2010 Accelerometer I2C Object/Class
Hey so we discovered that the 2010 Accelerometer is not Analog it is Completely Digital.
And the Class the Java API provides is for the 2009 Analog Accelerometer. It even says in the Documentation that they forgot to write a class for the new accelerometer and will try to add it soon. But Soon isn't soon enough. (Patience Fail) Does anyone know how to go about extending the I2C class in order to create a valid Accelerometer Class? This would be unbelievable helpful. Thx |
Re: 2010 Accelerometer I2C Object/Class
I am working on one now. I have a class for an I2C compass which is now working great. Accelerometer is next.
|
Re: 2010 Accelerometer I2C Object/Class
Quote:
It should be trivial to port the C++ version that I posted. http://decibel.ni.com/content/thread/5634 |
Re: 2010 Accelerometer I2C Object/Class
Thanks,
We converted the code to Java and are going to test it tomorrow. One thing that we had to change was that instead of using enumerations we used arrays. This was because the Version of Java the robot is running on does not support the use of enumerations, but i don't see how that could affect the return values. Again Thanks A Lot!!:) |
Re: 2010 Accelerometer I2C Object/Class
I am saddened our ported code did not work.
It may be that we just didnt translate some of the syntax correctly or something else IDK. Returned 0.0 Heres the code Quote:
Also if we cant get this to work where do you buy the analog accelerometer from last year? |
Re: 2010 Accelerometer I2C Object/Class
We also attempted a I2C accelerometer port and read 0.0 on x,y, and z.
I think the next step we may take is to flash our crio for C programming and see if we read anything but 0 in that environment. |
Re: 2010 Accelerometer I2C Object/Class
Does anyone know if they plan to release a new update for Java with support for an I2C Accelerometer anytime soon.
In the documentation it said that they would release it in later update. Also in case this never works is it legal to use the analog accelerometer from last year and just use the Accelerometer class in Java that was built for the analog Accelerometer? |
Re: 2010 Accelerometer I2C Object/Class
Quote:
Quote:
|
Re: 2010 Accelerometer I2C Object/Class
does anyone know where to buy the Analog Accelerometer Breakout ?
|
Re: 2010 Accelerometer I2C Object/Class
Quote:
Alternately, you could manufacture your own from the designs posted of last year's boards. -Joe |
Re: 2010 Accelerometer I2C Object/Class
Here is java class for the ADXL345 when connected as I2C device at default address.
Code:
/*----------------------------------------------------------------------------*/ |
Re: 2010 Accelerometer I2C Object/Class
Quote:
|
Re: 2010 Accelerometer I2C Object/Class
Quote:
Quote:
|
Re: 2010 Accelerometer I2C Object/Class
Quote:
|
Re: 2010 Accelerometer I2C Object/Class
RAWR!!!
thanks alot for help. I will try the above I2C class, looks better than ours. but then again ours was coded on a hope and a prayer seeing that we did not understand any of that low level stuff. thanks again. Also thanks for the analog accel link. |
| All times are GMT -5. The time now is 12:10. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi