Mobile goal for tipping point code

hey can someone help me code a mobile goal lift mine isnt working i want two motors to move together to lift a mobile goal

Welcome to the forums! It would help if you could post your code

ok heres it just copy pasted
while(true) {
goalholderright.spin(forward, Controller1.ButtonR1.pressing())
goalholderleft.spin(vex::directionType::fwd,100,vex::percentUnits::pct)
goalholderright.spin(vex::directionType::rev,100,vex::percentUnits::pct)
goalholderleft.spin(vex::directionType::rev,100,vex::percentUnits::pct);
}

i changed it so it looked better and because i thought this way would work im still getting an error though
while(true) {
Goalholder.spin(vex::directionType::fwd,vex::percentUnits::pct)
Goalholder.spin(vex::directionType::rev,vex::percentUnits::pct)

There are a lot of example programs available in the VexCode V5 Pro application.

One of the programs is called ControllerButtons that provides some insight.

// ---- START VEXCODE CONFIGURED DEVICES ----|
|---|---|
// Robot Configuration:|
// [Name]               [Type]        [Port(s)]|
// Controller1          controller                    |
// ArmMotors            motor_group   11, 12          |
// ---- END VEXCODE CONFIGURED DEVICES ----|

#include "vex.h"

using namespace vex;

// Method - 1 Callbacks
// whenControllerL1Pressed and whenControllerL2Pressed callback functions are
// registered to the contorller's button 'pressed' event. Whenever the 'Button
// L1' and 'Button R1` are pressed, the functions will run.

void whenControllerL1Pressed() {
  ArmMotors.spin(forward);
  waitUntil(!Controller1.ButtonL1.pressing());
  ArmMotors.stop();
}

void whenControllerL2Pressed() {
  ArmMotors.spin(reverse);
  waitUntil(!Controller1.ButtonL2.pressing());
  ArmMotors.stop();
}

int main() {
  // Initializing Robot Configuration. DO NOT REMOVE!
  vexcodeInit();

  // Set motor's brake mode and velocity
  ArmMotors.setStopping(hold);
  ArmMotors.setVelocity(30, percent);

  // Method 1 - Using Callbacks
  // Register callbacks to controller button 'pressed' events.
  Controller1.ButtonL1.pressed(whenControllerL1Pressed);
  Controller1.ButtonL2.pressed(whenControllerL2Pressed);

  // Method - 2 Inline-code
  // Use a 'forever loop' to constantly check the controller's values.
  while (true) {
	wait(25, msec);
  }
}
2 Likes

are you using block or letter code?

If you look at the above posts, you can see that they are using text. Also, please don’t revive old threads. This one is 2 months old, so it was probably solved already.

1 Like

How about you try posting a block code

This thread is now 3 months old, and seems to already have been solved. There is no need for more help to my knowledge.

5 Likes