View Single Post
  #5   Spotlight this post!  
Unread 06-02-2010, 23:24
michael1991j michael1991j is offline
Registered User
FRC #3139
 
Join Date: Feb 2010
Location: oxford alabama
Posts: 6
michael1991j is an unknown quantity at this point
Re: wiring and programing our optical encoders

hmm i wonder if it is somthing am doing wrong then

this is how i stated my code:

I state this inside my main class
Encoder encoder(1, 2, true);

and then in my teleop loop
I say
float tick = encoder.GetDistance() ;

printf("tick:%4.2f /n",tick );

and what i am getting is

tick:
tick:
tick:
.... and when I move my gear box i get no input
now i did noticed there is a spot for a jumper on the digital side car on the digital input sides do i need to put a jumper in there. the probem when i do that everything become nonresponsive until i remove it so does anybody know what am i doing wrong