Gyro - Not driving straight

We changed out our geared up Drivetrain to the Herobot Swish. We copied the code from a teacher workshop on youtube:

Our code matches the tutorial at 26:40


our devices are configured as such

and our robot looks like this

The intake rollers are the front of the robot. At the top of the front I have added the gyro sensor.

No matter what input we put into the My Block - the robot slowly starts backwards, then veers to the right and hits the field wall. What on earth are we doing wrong. we have tried everything:

  • changing the directionality of the DT motors
  • swapping the addition and subtraction in the while loop
  • setting motors to zero degrees after calibration
  • changing distance input
  • moving the gyro to the back, the side, the middle, upsidedown
  • changing the input to turns instead of rotations then adapting the code to reflect turns
  • swapping the directionality of the DT code from forward to reverse
  • adding a backward while loop in addition to the forward while loop

everything ends with the robot veering left or right or spinning.

We have tried the code on a basebot and it works perfectly. What is wrong with our robot that it makes the DT veer off to the side?

Could you show us a video on what is going on? That might help us digonse the issue better.

Could you take a screenshot of the code and then submit it off the computer? It’s a harsh angle that you’re currently showing us and I can’t read the code