View Single Post
  #2   Spotlight this post!  
Unread 03-05-2008, 11:14
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Automatic counter-Encoder

id reccomend setting up an interrupt and attatching your [s]encoder[/s] clicker to the interrupt ports on the edu-RC.

from there, you can add the signal to a stored variable, which will cause the integration you are looking for.


as for resetting after 30... you can do something like:

if (clicks % 30 == 0) {
clicks = 1;
}else{
clicks += input;
}
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY