The V5 Brain has a 480×240 touchscreen sitting idle during most matches. A custom display turns it into a real-time competition dashboard — showing battery, motor temperatures, selected autonomous, sensor readings, and match timer — everything your drive team needs at a glance.
Custom screen drawing runs in a background PROS Task that updates independently of the control loop. The task redraws the screen at a fixed rate (typically every 50–100ms). It reads robot state variables — battery, motor data, selected auton — and renders them to the screen. The control loop never touches the screen directly.
| Constant | Pixel Height | Lines on Screen | Best Used For |
|---|---|---|---|
E_TEXT_SMALL | ~16px | up to 12 lines | Detailed telemetry, motor data |
E_TEXT_MEDIUM | ~20px | up to 10 lines | General status, labels |
E_TEXT_LARGE | ~32px | up to 6 lines | Auton name, alerts, battery % |
E_TEXT_EXTRA_LARGE | ~48px | up to 4 lines | Match timer, critical warnings |
Colours are 24-bit hex values in 0xRRGGBB format. Common ones for competition screens:
The Brain has no built-in match timer — you have to implement it yourself. Start a timer at the beginning of opcontrol() and count down from 105 seconds:
Motor overheating is a competition failure mode. A bar graph of all motor temperatures makes it visible before it becomes a problem. V5 motors start reducing performance at 55°C and shut down at higher temperatures:
screen.cpp and screen.h as dedicated files — see the Organizing Code guide for how to split code across multiple files. The screen task is a perfect candidate for its own file: it has no dependencies on your auton logic and can be developed and tested independently.pros::screen::set_double_buffered(true) before drawing and pros::screen::render() after — this renders to an off-screen buffer and flips atomically, eliminating flicker entirely.fill_rect(x1,y1,x2,y2) defines it by two corner coordinates, an application of the Cartesian plane. Colour is expressed in 24-bit RGB hex (0xRRGGBB) — each channel is 8 bits (0–255), giving 256³ = 16.7 million possible colours.