From 1fecdaee619d73fc1495072a05ae202310b755d1 Mon Sep 17 00:00:00 2001 From: rafa Date: Sat, 24 May 2025 13:57:42 +0100 Subject: [PATCH] Config sttep motor pins with #define constants --- code/code.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/code.ino b/code/code.ino index 93c35dd..ec0e817 100644 --- a/code/code.ino +++ b/code/code.ino @@ -18,6 +18,10 @@ #define JOYSTICK_Y_PIN A0 #define BUZZER_PIN 3 #define BUTTON_PIN 8 +#define STEPPER_B_MINUS_PIN 6 +#define STEPPER_B_PLUS_PIN 5 +#define STEPPER_A_PLUS_PIN 4 +#define STEPPER_A_MINUS_PIN 2 #define PARK_SLOTS 3 #define STEP_MOTOR_STEPS 200 @@ -31,7 +35,7 @@ LCDScreen screen = LCDScreen(); CarSpotController car_spot_controller = CarSpotController(PARK_SLOTS); JoystickController joystick = JoystickController(JOYSTICK_X_PIN, JOYSTICK_Y_PIN); ButtonController button = ButtonController(BUTTON_PIN); -Stepper stepper(STEP_MOTOR_STEPS, 6, 5, 4, 2); +Stepper stepper(STEP_MOTOR_STEPS, STEPPER_B_MINUS_PIN, STEPPER_B_PLUS_PIN, STEPPER_A_PLUS_PIN, STEPPER_A_MINUS_PIN); unsigned long current_time, sensor_last_time_readed, barrier_last_time_opened, temperature_last_time_measured, joystick_last_time_activated, joystick_last_time_readed, screen_last_time_updated;