diff --git a/gbg_program/gbg_program.ino b/gbg_program/gbg_program.ino index 7bae9f0..9ce756b 100644 --- a/gbg_program/gbg_program.ino +++ b/gbg_program/gbg_program.ino @@ -70,18 +70,32 @@ int16_t SPEED_KNOB_FAST_VAL = 0; //analogRead value when knob is turned full //////////////////////////////////////////// PINS ///////////////////////////////////// +#if defined(ARDUINO_ARCH_MBED_RP2040)|| defined(ARDUINO_ARCH_RP2040) ///// joystick reader pins ///// byte JOY_X_PIN = A2; // Analog input pin that the left-right potentiometer is attached to byte JOY_Y_PIN = A0; // Analog input pin that the forwards-backwards potentiometer is attached to ///// drive controller pins ///// byte LEFT_MOTOR_CONTROLLER_PIN = 3; -byte RIGHT_MOTOR_CONTROLLER_PIN = 6; +byte RIGHT_MOTOR_CONTROLLER_PIN = 4; byte SPEED_KNOB_PIN = A1; byte BUTTON_MODE_PIN = 2; // can turn button control mode on and off +#else +byte JOY_X_PIN = A4; // Analog input pin that the left-right potentiometer is attached to +byte JOY_Y_PIN = A1; // Analog input pin that the forwards-backwards potentiometer is attached to + +///// drive controller pins ///// +byte LEFT_MOTOR_CONTROLLER_PIN = 3; +byte RIGHT_MOTOR_CONTROLLER_PIN = 6; + +byte SPEED_KNOB_PIN = A3; + +byte BUTTON_MODE_PIN = 2; // can turn button control mode on and off +#endif + ///////////////////////////////////////////// BUTTON CONTROL ///////////////////////////////// boolean ENABLE_BUTTON_CTRL = false; boolean USE_BUTTON_MODE_PIN = false;