Re-arrange pins

This commit is contained in:
Matt McWilliams 2024-02-18 16:48:55 +01:00
parent 6ab151a664
commit 93a4418545
3 changed files with 8 additions and 4 deletions

View File

@ -16,6 +16,7 @@ class ContactPrinter {
const uint16_t serial_delay = 5; const uint16_t serial_delay = 5;
const uint16_t baud = 115200; const uint16_t baud = 115200;
/* PINS */
const uint8_t takeup_picture_pin_enable = 23; const uint8_t takeup_picture_pin_enable = 23;
const uint8_t takeup_picture_pin_cw = 22; const uint8_t takeup_picture_pin_cw = 22;
const uint8_t takeup_picture_pin_ccw = 21; const uint8_t takeup_picture_pin_ccw = 21;
@ -24,13 +25,16 @@ class ContactPrinter {
const uint8_t takeup_stock_pin_cw = 18; const uint8_t takeup_stock_pin_cw = 18;
const uint8_t takeup_stock_pin_ccw = 5; const uint8_t takeup_stock_pin_ccw = 5;
const uint8_t start_button_pin = 34; const uint8_t start_button_pin = 17;
/* MOTOR PWM */
const uint32_t pwm_frequency = 30000; const uint32_t pwm_frequency = 30000;
const uint8_t takeup_picture_pwm_channel = 1; const uint8_t takeup_picture_pwm_channel = 1;
const uint8_t takeup_stock_pwm_channel = 2; const uint8_t takeup_stock_pwm_channel = 2;
const uint8_t pwm_resolution = 8; const uint8_t pwm_resolution = 8;
/* MEMORY */
volatile long timer = 0; volatile long timer = 0;
volatile float drive_speed = 1.0; //calculated rpm volatile float drive_speed = 1.0; //calculated rpm

View File

@ -9,8 +9,8 @@ class DriveMotor {
//defaults are for EPS32 dev board //defaults are for EPS32 dev board
volatile uint8_t enable_pin = 13; volatile uint8_t enable_pin = 13;
volatile uint8_t forward_pin = 12; volatile uint8_t forward_pin = 12; //Clockwise
volatile uint8_t backward_pin = 14; volatile uint8_t backward_pin = 14; //Counter-clockwise
volatile uint8_t encoder_a_pin = 27; volatile uint8_t encoder_a_pin = 27;
volatile uint8_t encoder_b_pin = 26; volatile uint8_t encoder_b_pin = 26;

View File

@ -23,7 +23,7 @@
* 27 Drive Encoder A * 27 Drive Encoder A
* 26 Drive Encoder B * 26 Drive Encoder B
* *
* 34 Start Button * 17 Start Button
* *
* 33 Lamp * 33 Lamp
* *