Here’s a quick program in Python to display the battery state and motor temp (for motor_15, one of my drive motors). It prints the motor temp, runs for 30 seconds, then prints the ending motor temp:
import vex
import sys
#region config
brain = vex.Brain()
motor_15 = vex.Motor(vex.Ports.PORT15, vex.GearSetting.RATIO18_1, True)
motor_16 = vex.Motor(vex.Ports.PORT16, vex.GearSetting.RATIO18_1, False)
#endregion config
# main thread
brain.screen.print_line(2, 'Battery capacity plus motor temp')
brain.screen.print_line(3,brain.battery.capacity())
brain.screen.print_line(5,vex.Motor.temperature(motor_15))
motor_15.spin(vex.DirectionType.FWD)
sys.sleep(30)
brain.screen.print_line(6,vex.Motor.temperature(motor_15))
sys.sleep(5)