Motors stop after one second

Ok so, my motors were working fine and now all of sudden, they stop after a second. Even when they are in a loop.

The Yellow LED all of sudden starts flashing 4 times a second which indicates low battery but I have charged the rechargeable battery and used a second battery and have the same result.

The motors simply don’t want to continue. However, the Motor Test code works when I hold down the push button. So im really confused at this point. The motor code is almost exactly the same.

Could the motors have been disabled, and if so, is there a way to reenable them using code?

regards,
Brad

Post your code, will take a look

Hi, so I have done more research. Apparently as soon as I configure the Thermal Infrared Sensor, the EV3 motors stop working.

The line of code is:
bp.set_sensor_type(BP.PORT_1, BP.SENSOR_TYPE.I2C, [0, 20])

Once I comment it out, everything works. But for my firefighting robot to work, I really need the Thermal Infrared Sensor to work at the same time as the motors.

By the way Im using BrickPi 3.