View Single Post
  #4   Spotlight this post!  
Unread 19-02-2007, 13:03
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Encoder Problemo

Here is a quick program I wipped up in easyC you can use to test your encoders.

Encoder 1 - Plug into I/O Port 1 (Channel A)
Plug into I/O Port 7 (Channel B)

Encoder 2 - Plug into I/O Port 2 (Channel A)
Plug into I/O Port 8 (Channel B)

Source:
Code:
void OperatorControl ( void )
{
      StartQuadEncoder ( 1 , 7 , 0 ) ;
      StartQuadEncoder ( 2 , 8 , 1 ) ;
      while ( 1 )
      {
            PrintToScreen ( "Encoder 1: %5ld   Encoder 2: %5ld\n" , (long)GetQuadEncoder ( 1 , 7 ), (long)GetQuadEncoder ( 2 , 8 ) ) ;
      }
}
Attached is pre compliled program incase you don't have easyC installed. You can upload it to your robot with IFI loader.
Attached Files
File Type: zip help_encoder.zip (18.1 KB, 15 views)
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni