View Single Post
  #5   Spotlight this post!  
Unread 14-03-2004, 01:29
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Wierd gyro code problems...pls help

Quote:
Originally Posted by Salik Syed
haha ......lol i'm a noob.......thanx both of you

one more question........you know how it says : gyro1=>>gyro1 (or whatever) ..... will it shift every time the cycle loops.....like one loop it is 8 bit then 6 then 4????I hope not!....we have the shift in our program loop (outside of initilization) because we have to shift it after making it equal to the analog ....is that correct?
only if you stop reading it in with the Get_analog statement in each loop.

if you put shift right (gyro>>2) statements after each other, then yes, each statement will shift it right another two places

but in your code Im sure you are reading in new data on each loop, the old data is overwritten, so the new data is whats getting shifted.