|
Re: encoder vs. motor
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
|