View Single Post
  #38   Spotlight this post!  
Unread 23-12-2014, 09:16
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,080
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Best gyro for frc.

Quote:
Originally Posted by seg9585 View Post
As in the long variable returned will always be a multiple of 4 (or 8), or a return of "1" actually means 4ms? If the former, no impact since I am just comparing time now to time at last sample collection.

I'm using SPI.transfer(data), not digitalWrite. Is there a more efficient method than this one?
Looks like you already figured it out, the returned value will always be a multiple of 4.

I'd be willing to bet doing the SPI write yourself would be more efficient but it's probably not a huge deal. The only reason I did any tests was I needed faster executing digital writes. It was mostly an example of how the wrapper library is pretty inefficient.





Mounting the gyro near the roboRio probably won't be an issue. Every time I've run a gyro has been an analog gyro, the issue was that the signal got messed up by the magnetic fields caused by currents driving motors. Minimizing transmission distance should help you there. But this gyro talks SPI so it's less susceptible to that issue.
__________________




.