V5 pro code help

Can I print the data of the automatic race to this place? I want to be able to check whether the distance and turning degree of the automatic race are correct

Yes, if you print to stdout (using printf or std::cout) it will show up in the “terminal” tab, provided that the brain or controller is plugged into your computer.

https://www.cplusplus.com/reference/cstdio/printf/

https://www.cplusplus.com/reference/iostream/cout/

You can also print text to the brain screen, that way you don’t need to be connected to a computer to see the debug output.

3 Likes

Yes, you can do:

std::cout << "Insert your message here";

This will make whatever text you put in the quotes print under the terminal tab.
Also, make sure that you include <iostream> at the top of the file:

#include <iostream>

Keep in mind that this will only work if your brain/controller is connected to your computer.

3 Likes