Thread: encoders
View Single Post
  #52   Spotlight this post!  
Unread 08-02-2005, 16:38
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

Quote:
Originally Posted by Ssbfalcon
Based on what I see, interupts would be more reliable. However, assuming that the reliability of each method are equal, what are the pros and cons of polling and interupts, besides code complexity?
polling= slow roation only, less reliability overall, I'm not sure, but possibly unnecessary strain on the processor (but I doubt it), won't be prepared for using encoders in the future with interrupts on drive shafts, etc. adv. easy coding like you said.

interrupts=every advantage you could imagine, except tough coding. this is why Mr. Watson wrote code to handle encoders with interrupts, it's truly a wonderful thing he has made. go to www.kevin.org and scroll down to the robotics link, and look for frc encoders template. It's what I used to learn about encoders and interrupts, and it is so easy to use because all the work is already done pretty much. though I wish he would consider setting up a third encoder interrupt as well, but what he has is awesome.