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()