mirror of
https://gitlab.com/yikestone/qt_pi.git
synced 2025-08-03 21:54:12 +05:30
20 lines
363 B
C
20 lines
363 B
C
#ifndef ENCODER_H
|
|
#define ENCODER_H
|
|
|
|
#define LEFT_ENC_PIN_A PC2
|
|
#define LEFT_ENC_PIN_B PC3
|
|
|
|
#define RIGHT_ENC_PIN_A PD2
|
|
#define RIGHT_ENC_PIN_B PD3
|
|
|
|
#define ODOM_RATE 50
|
|
const int ODOM_INTERVAL = 1000 / ODOM_RATE;
|
|
|
|
extern void init_enc();
|
|
extern void resetEncoder(int);
|
|
extern void resetEncoders();
|
|
extern long readEncoder(int);
|
|
extern void sendOdom();
|
|
|
|
#endif
|