View Single Post
  #4   Spotlight this post!  
Unread 03-02-2010, 12:49
NerdGuy's Avatar
NerdGuy NerdGuy is offline
Registered User
FRC #2974
 
Join Date: Jan 2010
Location: Atlanta
Posts: 16
NerdGuy is an unknown quantity at this point
Re: 2010 Accelerometer I2C Object/Class

/sigh

we tested this code yesterday.

but it did not work for us and since the code seems to work for u guys.
We are probably doing something wrong.

For our wiring we plugged in (obviously 5v to 5v and 0v to ground and so on) but what i have a question on is which I2C channel those plug in to. There are 2 that are not labeled, so i guess the question here is what channel I2C is the kaddress is referring to?

Also I am using the class in the code by

-instantiating with an argument of 4 (which is where the digital module is plugged in to on the crio)

-calling the initialize() method

-and then calling the getXAxis() method in my polling while loop which runs every .02 seconds.



The only thing i could see that might cause a problem is that the accel does not show a significant enough amount of change in the .02s in which we check it.

If this is what is happening please let me know and if its not please try and help.


Thanks in advance.
__________________
"Life would be so much easier if we only had the source code."
Reply With Quote