implement motor driver
This commit is contained in:
+7
-3
@@ -16,8 +16,12 @@
|
||||
#define FORWARD 1
|
||||
#define BACKWARD 2
|
||||
|
||||
//PWM Configs
|
||||
#define PWM_FREQ 5000
|
||||
//MotorControl config
|
||||
#define PWM_FREQ 16000
|
||||
#define PWM_RES 8
|
||||
#define PWM_CHANNEL_M1 0
|
||||
#define PWM_CHANNEL_M2 1
|
||||
#define PWM_CHANNEL_M2 1
|
||||
#define UPDATE_TIME 25
|
||||
#define SPEED_STEPS 5 // A total of 20 levels ( 100 / SPEED_STEPS ) * UPDATE_TIME = 500ms
|
||||
#define PWM_MIN 40
|
||||
#define PWM_MAX 245 // Max 98% of 2^PWM_RES
|
||||
Reference in New Issue
Block a user