Display on Brain

I am going to test my code soon, and need to know how to display a number or variable we are keeping track of on the brain. This is to see if it is correct and there are no errors.

We want to test our Odom code and want to display the Odom angle value on the brain.
Can someone explain how to do this? Thanks!

**This is using PROS

I’m not a coder, but from my understanding it should be something to do with “print”.

Edit: After using the search bar, this came up, which should answer your question: How to display data with PROS like Brain.Screen.printAt() of vexcode


You can achieve this by using the pros::lcd class. Before printing anything to the screen, you must run pros::lcd::initialize(). Afterward, you can start printing to the screen using pros::lcd::print(line number, format string, format values). The string and format values are the same as using printf. For more information, you can see the documentation on the lcd here,
You should actually be able to see an example of this in the initialize() function in main.cpp, as it is generated automatically when creating a new PROS project.

1 Like