View Single Post
  #3   Spotlight this post!  
Unread 19-01-2009, 13:26
petet4 petet4 is offline
Registered User
AKA: Pete Thomas
FRC #0706 (Cyberhawks)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Waukesha, WI.
Posts: 18
petet4 is on a distinguished road
Re: Inputs for the Encoder

The example was using C and the C libs, have not tried with C++. The digital inputs were defined in the function call.

if these are defined as 8 & 9 then everthing works,

static const UINT32 ENC_A = 10;
static const UINT32 ENC_B = 11;

In the Initialize function..
StartEncoder(ENC_A, ENC_B);

then in the OperatorControl function is
enc = GetEncoder(ENC_A, ENC_B);

GetEncoder() only returns a 0 or 1 for inputs 10&11 but if the inputs are moved to 8&9 and the code changed to reflect the input change all works.

I think there still might be some issues that need to worked out either in the WPIlibs (C) or in the hardware.

Will try with C++ and see is using inputs 10&11 still have issues

jee7s, Thanks for the above reply,

-pete