View Single Post
  #4   Spotlight this post!  
Unread 25-03-2010, 09:32
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: How to read Cypress values properly?

Do you want to detect rotation or translation? If you want to slide the box to one side, just look for a change from a predefined center point. If you want to twist the box, it is more complex. Since an accelerometer is not a gyro, it does not detect rotation. There are two ways to handle this: You could move it in an arc (and detect the sideways motion) or try to determine which direction is down by seeing how gravity is affecting each axis. Or, you could get a 3.3v gyro and integrate it in software (you cannot use the WPI Gyro code for this).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack