V5 brain stops running programs immediately

Our brain quits running programs after 1 second. It happens after we add something to the lettered ports on the side.

Try to run an (almost) empty program. See if it still happens

I’ve already tried that. Thanks though.

To clarify, it runs when we test if by itself, but we have the problem when we try to use it in our driver control.

you need to post some code, otherwise we are all just guessing. Try and make a minimal program that demonstrates the issue.

3 Likes
# VEX V5 Python Project
import sys
import vex
from vex import *
import motor_group
import drivetrain
import smartdrive
import vex

#region config
brain    = vex.Brain()
motor_1  = vex.Motor(vex.Ports.PORT1, vex.GearSetting.RATIO18_1, False)
motor_12 = vex.Motor(vex.Ports.PORT12, vex.GearSetting.RATIO18_1, False)
motor_13 = vex.Motor(vex.Ports.PORT13, vex.GearSetting.RATIO18_1, True)
motor_14 = vex.Motor(vex.Ports.PORT14, vex.GearSetting.RATIO18_1, False)
motor_15 = vex.Motor(vex.Ports.PORT15, vex.GearSetting.RATIO18_1, True)
motor_16 = vex.Motor(vex.Ports.PORT16, vex.GearSetting.RATIO18_1, True)
motor_17 = vex.Motor(vex.Ports.PORT17, vex.GearSetting.RATIO18_1, False)
motor_18 = vex.Motor(vex.Ports.PORT18, vex.GearSetting.RATIO18_1, True)
pnum2    = vex.Pneumatics(brain.three_wire_port.c)
pot      = vex.Pot(brain.three_wire_port.e)
#endregion config

con.set_deadband(5)

buttondown_pressed = False
buttonup_pressed = False
motor_12_running = 0

#region actions
while True:
    motor_15_power = 0
    motor_16_power = 0
    motor_13_power = 0
    motor_14_power = 0
    motor_17_power = 0
    motor_18_power = 0
    motor_1_power = 0
    motor_12_power = 0
    angle = pot.value(RotationUnits.DEG)
	# axis2: Linear Control
    power = con.axis2.position()
    if power != 0:
        motor_15_power = power
	
	# axis2: Linear Control
    power = con.axis2.position()
    if power != 0:
        motor_16_power = power
	
	# axis3: Linear Control
    power = con.axis3.position()
    if power != 0:
        motor_13_power = power
	
	# axis3: Linear Control
    power = con.axis3.position()
    if power != 0:
        motor_14_power = power
	
	# axis4: Linear Control
    power = con.axis4.position()
    if power != 0:
        motor_15_power = power
	
	# axis4: Linear Control
    power = con.axis4.position()
    if power != 0:
        motor_16_power = power
	        
	# buttonR1: Forward
    if con.buttonR1.pressing():
        motor_1_power = 100
	
	# buttonR2: Reverse
    if con.buttonR2.pressing():
        motor_1_power = -100
	
    if con.buttonUp.pressing():
        motor_12_power = -90
	
	# buttonDown: Forward
    if con.buttonDown.pressing():
        motor_12_power = 90
	
    if con.buttonA.pressing():
        pnum2.set(False)
    elif con.buttonB.pressing():
        pnum2.set(True)
        
    motor_15.spin(vex.DirectionType.FWD, motor_15_power)
    motor_16.spin(vex.DirectionType.FWD, motor_16_power)
    motor_13.spin(vex.DirectionType.FWD, motor_13_power)
    motor_14.spin(vex.DirectionType.FWD, motor_14_power)
    motor_17.spin(vex.DirectionType.FWD, motor_17_power)
    motor_18.spin(vex.DirectionType.FWD, motor_18_power)
    motor_1.spin(vex.DirectionType.FWD, motor_1_power)
    motor_12.spin(vex.DirectionType.FWD, motor_12_power)

That’s a RobotMesh project ?
Guess you need to either post on the RobotMesh forum or wait for them to reply.

4 Likes