Skip to content

Commit

Permalink
Actualizar contenido del submódulo linorobot2_hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
rxtm0001 committed Jun 24, 2024
1 parent 105a2b0 commit 8816b7a
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions config/lino_base_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#define LED_PIN 13 //used for debugging status

//uncomment the base you're building
#define LINO_BASE DIFFERENTIAL_DRIVE // 2WD and Tracked robot w/ 2 motors
//#define LINO_BASE DIFFERENTIAL_DRIVE // 2WD and Tracked robot w/ 2 motors
// #define LINO_BASE SKID_STEER // 4WD robot
// #define LINO_BASE MECANUM // Mecanum drive robot
#define LINO_BASE MECANUM // Mecanum drive robot

//uncomment the motor driver you're using
#define USE_GENERIC_2_IN_MOTOR_DRIVER // Motor drivers with 2 Direction Pins(INA, INB) and 1 PWM(ENABLE) pin ie. L298, L293, VNH5019
Expand All @@ -29,8 +29,8 @@
// #define USE_ESC_MOTOR_DRIVER // Motor ESC for brushless motors

//uncomment the IMU you're using
#define USE_GY85_IMU
// #define USE_MPU6050_IMU
// #define USE_GY85_IMU
#define USE_MPU6050_IMU
// #define USE_MPU9150_IMU
// #define USE_MPU9250_IMU

Expand All @@ -47,17 +47,17 @@ ROBOT ORIENTATION
*/

//define your robot' specs here
#define MOTOR_MAX_RPM 140 // motor's max RPM
#define MOTOR_MAX_RPM 200 // motor's max RPM
#define MAX_RPM_RATIO 0.85 // max RPM allowed for each MAX_RPM_ALLOWED = MOTOR_MAX_RPM * MAX_RPM_RATIO
#define MOTOR_OPERATING_VOLTAGE 24 // motor's operating voltage (used to calculate max RPM)
#define MOTOR_POWER_MAX_VOLTAGE 12 // max voltage of the motor's power source (used to calculate max RPM)
#define MOTOR_POWER_MEASURED_VOLTAGE 12 // current voltage reading of the power connected to the motor (used for calibration)
#define MOTOR_OPERATING_VOLTAGE 6 // motor's operating voltage (used to calculate max RPM)
#define MOTOR_POWER_MAX_VOLTAGE 7 // max voltage of the motor's power source (used to calculate max RPM)
#define MOTOR_POWER_MEASURED_VOLTAGE 6.80 // current voltage reading of the power connected to the motor (used for calibration)
#define COUNTS_PER_REV1 144000 // wheel1 encoder's no of ticks per rev
#define COUNTS_PER_REV2 144000 // wheel2 encoder's no of ticks per rev
#define COUNTS_PER_REV3 144000 // wheel3 encoder's no of ticks per rev
#define COUNTS_PER_REV4 144000 // wheel4 encoder's no of ticks per rev
#define WHEEL_DIAMETER 0.152 // wheel's diameter in meters
#define LR_WHEELS_DISTANCE 0.271 // distance between left and right wheels
#define WHEEL_DIAMETER 0.14324 // wheel's diameter in meters
#define LR_WHEELS_DISTANCE 0.2 // distance between left and right wheels
#define PWM_BITS 10 // PWM Resolution of the microcontroller
#define PWM_FREQUENCY 20000 // PWM Frequency

Expand All @@ -74,35 +74,35 @@ ROBOT ORIENTATION
#define MOTOR4_INV false

// ENCODER PINS
#define MOTOR1_ENCODER_A 14
#define MOTOR1_ENCODER_B 15
#define MOTOR1_ENCODER_A 23
#define MOTOR1_ENCODER_B 22

#define MOTOR2_ENCODER_A 11
#define MOTOR2_ENCODER_B 12
#define MOTOR2_ENCODER_A 21
#define MOTOR2_ENCODER_B 20

#define MOTOR3_ENCODER_A 17
#define MOTOR3_ENCODER_B 16

#define MOTOR4_ENCODER_A 9
#define MOTOR4_ENCODER_B 10
#define MOTOR4_ENCODER_A 15
#define MOTOR4_ENCODER_B 14

// MOTOR PINS
#ifdef USE_GENERIC_2_IN_MOTOR_DRIVER
#define MOTOR1_PWM 21 //Pin no 21 is not a PWM pin on Teensy 4.x, you can swap it with pin no 1 instead.
#define MOTOR1_IN_A 20
#define MOTOR1_IN_B 1
#define MOTOR1_PWM 1 //Pin no 21 is not a PWM pin on Teensy 4.x, you can swap it with pin no 1 instead.
#define MOTOR1_IN_A 2
#define MOTOR1_IN_B 3

#define MOTOR2_PWM 5
#define MOTOR2_IN_A 6
#define MOTOR2_IN_B 8
#define MOTOR2_PWM 6
#define MOTOR2_IN_A 4
#define MOTOR2_IN_B 5

#define MOTOR3_PWM 22
#define MOTOR3_IN_A 23
#define MOTOR3_IN_B 0
#define MOTOR3_PWM 7
#define MOTOR3_IN_A 8
#define MOTOR3_IN_B 9

#define MOTOR4_PWM 4
#define MOTOR4_IN_A 3
#define MOTOR4_IN_B 2
#define MOTOR4_PWM 12
#define MOTOR4_IN_A 10
#define MOTOR4_IN_B 11

#define PWM_MAX pow(2, PWM_BITS) - 1
#define PWM_MIN -PWM_MAX
Expand Down

0 comments on commit 8816b7a

Please sign in to comment.