![]() |
Need Help with Encoder - Won't Count Clicks
1 Attachment(s)
I need help getting these encoder clicks to work in the 2005 FRC. It works fine in the demo encoder.hex. But I can't it to work with the current frc.
What am I doing wrong?? Thanks Adam |
Re: Need Help with Encoder - Won't Count Clicks
I am not sure whats included inside of the 'Initialize_Encoders();' function, but I believe that you need to initialize the interrupts first by running function 'Initialize_Interrupts();' before you run 'Initialize_Encoders();' inside of function 'User_Initialization()', like so:
Code:
void User_Initialization (void) |
Re: Need Help with Encoder - Won't Count Clicks
Error - could not find definition of symbol 'Initialize_Interrupts' in file 'C:\FrcCode2005v2.4\user_routines.o'.
Errors : 1 :( |
Re: Need Help with Encoder - Won't Count Clicks
Quote:
|
Re: Need Help with Encoder - Won't Count Clicks
Sorry, thats just in my teams code I guess, I do not remember the default code, here is what the function looks like:
Code:
void Initialize_Interrupts(void) edit: - if you are adding the function, be sure to set the right interrupts you re using, and if not, make sure that they are set correctly as of now - How are "Get_Left_Encoder_Count();" and "Get_Right_Encoder_Count()" defined in your code? And what does your 'InterruptHandlerLow()' (inside of user_routines_fast.c) function include? |
Re: Need Help with Encoder - Won't Count Clicks
EDIT: we got it working fine
|
| All times are GMT -5. The time now is 22:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi