Hi, Thank you in advance for any feedback for my question. I made a XY plotter machine that I want to control with a joystick. The joystick has 4 momentary pushbuttons. One for up, down, left, right. I want the up and down to control one motor (or x axis), forward and backwards, and the left and right to control the second motor (y axis), forwards and backwards. I am using an Arduino UNO with Motor shield. I have all of the wiring part sorted out, but I am having trouble with my code. The problem is when I push forwards, the motor keeps going forward even when I stop pushing the button. I would like it to stop when I stop pushing the button. I am not too familiar with programming. Here is the code I am using: //Channel A or X Axis int upPinX = 2; int downPinX = 4; int forwardX = 0; int reverseX = 0; //Channel B or Y Axis int upPinY = 5; int downPinY = 6; int forwardY = 0; int reverseY = 0; void setup() { //Setup Channel A or X Axis pinMode(12, OUTPUT); //Initiates Motor Channel A pin pinMode(9, OUTPUT); //Initiates Brake Channel A pin pinMode(upPinX, INPUT); //Motor A forward pushbutton pinMode(downPinX, INPUT); //Motor A backward pushbutton //Setup Channel B or Y Axis pinMode(13, OUTPUT); //Initiates Motor Channel A pin pinMode(8, OUTPUT); //Initiates Brake Channel A pin pinMode(upPinY, INPUT); //Motor A forward pushbutton pinMode(downPinY, INPUT); //Motor A backward pushbutton } void loop(){ forwardX = digitalRead(upPinX); reverseX = digitalRead(downPinX); forwardY = digitalRead(upPinY); reverseY = digitalRead(downPinY); if (forwardX == LOW) { digitalWrite(12, HIGH); //Establishes forward direction of Channel A digitalWrite(9, LOW); //Disengage the Brake for Channel A analogWrite(3, 1023); //Spins the motor on Channel A at full speed } if (reverseX == LOW) { digitalWrite(12, LOW); //Establishes forward direction of Channel A digitalWrite(9, LOW); //Disengage the Brake for Channel A analogWrite(3, 1023); //Spins the motor on Channel A at full speed } if (forwardY == LOW) { digitalWrite(13, HIGH); //Establishes forward direction of Channel A digitalWrite(8, LOW); //Disengage the Brake for Channel A analogWrite(11, 1023); //Spins the motor on Channel A at full speed } if (reverseY == LOW) { digitalWrite(13, LOW); //Establishes forward direction of Channel A digitalWrite(8, LOW); //Disengage the Brake for Channel A analogWrite(11, 1023); //Spins the motor on Channel A at full speed } else { digitalWrite(9, HIGH); //Eengage the Brake for Channel A digitalWrite(8, HIGH); //Engage the break for Channel B } } - Also perhaps someone could let me know how I can insert code in one of those code boxes? Thanks,