|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Re: Third Encoder Channel
I'm not concerned about a third encoder, but that is not to say I don't need help.
Encoders were the last thing on our minds putting the robot together. Now the team would like to use them to get accurate distance measures. The problem I am thinking exists is with Kevins code, Digital's 1,2,6&8 are used for the encoders, and I assume the interrupt routines. We are using those digitals already on the robot. (1-11 and 17,18 are all used) Where specifically do I need to change the interrupt code to have the interrupts function for say... digitals 12,13,14,15. I understand needing to change the user_routines.c file for INPUT/OUPUT but interrupts confuse me. Also, I see in encoder.h that Kevin is #define ing the XXX_Encoder_Phase_B_Pin's but not the Phase_A_Pins? Am I missing something? Thanks in advance for your assistance. Phil Last edited by phillutz : 18-02-2005 at 11:13. |
|
#17
|
|||||
|
|||||
|
Re: Third Encoder Channel
Quote:
|
|
#18
|
|||
|
|||
|
Re: Third Encoder Channel
1. Can I change at least digital 6&8 to something else.
We have a wiring harness that is pulled into dig 1-11. This can be moved up to 3-13, but has to stay together... 2. Do I need to change anything in the Interrupt routines if the answer to #1 is yes? Thanks, Phil |
|
#19
|
|||||
|
|||||
|
Re: Third Encoder Channel
Quote:
You'll need to change the following two lines found in encoder.h to reflect the new digital inputs. Code:
#define LEFT_ENCODER_PHASE_B_PIN rc_dig_in06 ... #define RIGHT_ENCODER_PHASE_B_PIN rc_dig_in08 |
|
#20
|
|||
|
|||
|
Re: Third Encoder Channel
I will mod the code tonight (This work thing keeps getting in the way of robotics).
Thanks for the quick responses. Phil |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| encoder vs. motor | stephenthe1 | Programming | 55 | 06-01-2005 22:07 |
| Updated Encoder Code Available | Kevin Watson | Programming | 2 | 04-01-2005 01:00 |
| Choosing an Encoder for the Drive-train | MikeDubreuil | Electrical | 11 | 21-10-2004 00:50 |
| The Science Channel to broadcast FIRST documentary | Andy Baker | General Forum | 49 | 01-03-2004 14:03 |
| how to add steps in the provided encoder program for the edu | Zaramel2002 | Programming | 3 | 11-02-2004 08:35 |