encoder_driver.h 693 B

1234567891011121314151617181920212223
  1. /**************************************************************
  2. Encoder driver function definitions - by James Nugen
  3. *************************************************************/
  4. //below can be changed, but should be PORTD pins;
  5. //A wheel encode pin
  6. #define ENC_A_PIN_A 2 //pin 2 -- interrupt 0
  7. #define ENC_A_PIN_B 3 //pin 3 -- interrupt 1
  8. //B wheel encode pin
  9. #define ENC_B_PIN_A 21 //pin 21 -- interrupt 2
  10. #define ENC_B_PIN_B 20 //pin 20 -- interrupt 3
  11. //C wheel encode pin
  12. #define ENC_C_PIN_A 19 //pin 19 -- interrupt 4
  13. #define ENC_C_PIN_B 18 //pin 18 -- interrupt 5
  14. long readEncoder(int i);
  15. void resetEncoder(int i);
  16. void resetEncoders();
  17. void initEncoders();