Add firmware code to repo (#8)
* Added primary stepper motor driver code to repo * Added odometery encoder code to repo * Added the ability to update encoder wheel ratio via ros service Co-authored-by: Pimpest <82343504+Pimpest@users.noreply.github.com> Co-committed-by: Pimpest <82343504+Pimpest@users.noreply.github.com>
This commit is contained in:
25
firmware/base/src/config.h
Normal file
25
firmware/base/src/config.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
//############## CONFIG STEPPERS ################
|
||||
#define DIR_PIN_A 16
|
||||
#define DIR_PIN_B 26
|
||||
#define PULSE_PIN_A 17
|
||||
#define PULSE_PIN_B 27
|
||||
|
||||
#define SM_A 0
|
||||
#define SM_B 1
|
||||
|
||||
#define PULSE_PER_REV (1 / 3200.0)
|
||||
//###############################################
|
||||
|
||||
//================ CONFIG ENCODERS =====================
|
||||
#define ENCODER_RIGHT_PIN_A 12 // Lupio sam ove vrednosti
|
||||
#define ENCODER_RIGHT_PIN_B 13
|
||||
#define ENCODER_LEFT_PIN_A 6
|
||||
#define ENCODER_LEFT_PIN_B 7
|
||||
#define ENCODER_CPR 3840
|
||||
|
||||
#define WHEEL_RADIUS 0.0279
|
||||
#define WHEEL_SEPARATION 0.31133
|
||||
#define TIMER_CYCLE_US 1000
|
||||
//======================================================
|
||||
Reference in New Issue
Block a user