Skip to content

Commit

Permalink
#38
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-8 committed Jun 28, 2024
1 parent a7370c8 commit 3091a65
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gbg_program/gbg_program.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3091a65

Please sign in to comment.