Hello Sara and Rui.
In the codes for ESP32 with WebSocket, where in the program is it more convenient to place calls to functions such as OLED displays, math operations, sensor readings, etc.?
Thanks in advance and congratulations.
It depends on your project.
But, if you want to display something on a display, you can place it on the loop().
If you want to get sensor readings every X number of sections, you can also place it on the loop().
But, it will depend on what your project does.