View Single Post
  #52   Spotlight this post!  
Unread 05-01-2005, 15:36
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: encoder vs. motor

Quote:
Originally Posted by stephenthe1
as I was looking at Kevin's encoder template, I was wandering how these particular variables are available to all files, as they aren't declared with the "extern" keyword.
examples:

long Get_Left_Encoder_Count(void); // call this to get the current left
// wheel's encoder count

long Get_Right_Encoder_Count(void); // call this to get the current right
// wheel's encoder count

void Set_Left_Encoder_Count(long); // call this to set the left wheel's
// encoder count

void Set_Right_Encoder_Count(long); // call this to set the right wheel's
// encoder count

void Left_Encoder_Int_Handler(void); // left wheel encoder interrupt handler

void Right_Encoder_Int_Handler(void); // right wheel encoder interrupt handler

do you see what I mean? this is pretty much the only thing keeping me from coding our encoder is understanding why this is. thanks. also, does anyone know an easy way to set up a third encoder easily with his code (attatched to dig_in_01 and dig_in_02 (plus setting them up as interrupts))? I'm semi-new, so I'm proned to mistakes. thanks again,
Stephen
Stephen,

All of your examples are of functions not variables...
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...