Thread: Encoder Code
View Single Post
  #6   Spotlight this post!  
Unread 13-02-2009, 17:32
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: Encoder Code

Before you can start reading counts from the encoders, you have to call Start() on them first. It looks like you've defined a function that does this for both of your encoders, but that function is never being called. You should call your EncoderInit() function wherever you'd like to start taking measurements, perhaps in RobotInit() or in your constructor.

Code:
void RobotInit()
{
   // .. Existing initialization code..
   EncoderInit();
}
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
Reply With Quote