Motor temps on controller

I was playing around with the code a little bit, and can’t seem to find out how to display the motor temperatures on the controller. If anyone could help that would be great!


Print to controller:

Motor temperature:

Loop for updates


@Deicer image|231x500 is it the first print or 2nd print? And is it the first temp or the 2nd tempimage

both work. It appears the first displays the temperature as a percentage from maximum overheat while the second just gives you the temperature in whatever temp units you call. (Celsius or Fahrenheit judging from the docs on temp units)


Thank you. I will try this

I still couldn’t get it. It didn’t make sense. @jpearman or @Deicer , I would like some help. so far I have: Controller1.Screen.print(“Temp %f”, LeftSlurp.temperature(percentUnits::pct));

what were the issues with your program?

It image
It just has the zeros and doesn’t change

ah, you are printing the new values at the end of the previous print. I have my own problems with text positioning so I can’t give you a solution straight up, but you’ll need to clear the screen of your previous print before re-printing.


So if running the temperature code within the user control section of the competition template, is it enough to have it refresh through the while(true) loop of the joystick control functions?

yup. as long as it is being refreshed however often you need you can do it wherever you please.

1 Like