EXP Drivetrain Issue - Code works elsewhere

Sorry if this belongs elsewhere. I saw IQ and V5 but no exp. I know it is a simple issue and must have an obvious noob answer.

When I run the built in drive program the robot (base bot + bumper) runs but when I run this program the motors do nothing. I’ve downloaded it on five other bots and it works on them. Cables are in the right spots.

I tried these suggestions from another thread without success.

  • Do the motors work properly if you go through the settings menu on the brain to test them? - yes
  • Did you get a good download of the code to the robot? - yes
  • Do you have the correct motor ports selected for the drive train motors? - yes
  • Did you try deleting all the programs through the Brain menu? - yes
  • Did you try a factory reset through the Brain menu? - yes

Other things to check before I pull my hair out?

Note: The kids are working in blocks but I assume this is what y’all need

remote_control_code_enabled = None
myVariable = 0

def when_started1():
    global myVariable, remote_control_code_enabled
    brain.screen.set_fill_color(Color.GREEN)
    brain.screen.draw_rectangle(0, 0, 159, 107)

def onevent_bumper_a_pressed_0():
    global myVariable, remote_control_code_enabled
    remote_control_code_enabled = False
    drivetrain.stop()
    brain.screen.set_fill_color(Color.RED)
    brain.screen.draw_rectangle(0, 0, 159, 107)
    wait(3, SECONDS)
    remote_control_code_enabled = True
    brain.screen.set_fill_color(Color.GREEN)
    brain.screen.draw_rectangle(0, 0, 159, 107)

# Calibrate the Drivetrain
calibrate_drivetrain()

# system event handlers
bumper_a.pressed(onevent_bumper_a_pressed_0)
# add 15ms delay to make sure events are registered correctly.
wait(15, MSEC)

when_started1()

Other things to try:

  • Link a different controller and reload.
  • Create a basic drive train program in “text” and load it into the same slot. Run it to make sure it works. Then reload your blocks code and see if it works.

I tried both things and they did not work. I went back through and tested the code piece by piece. If I remove the “controller disable” part everything works. However, this shouldn’t be impacting anything because the bumper hasn’t been hit. The bumper seems to be functional and the screen is green, so presumably the bot doesn’t think it has been hit.

Any thoughts on this?

I also had another class today where several more students had the issue and others didn’t.

Here are the original instructions from VEX and full code in block form.

verify the 3wire port controller and bumper switch work using the devices screen, may be a hardware issue.

Use the feedback tool with the project open so support can test you project and rule out a coding issue.

3 Likes