Science Olympiad Electric Vehicle — 3rd at NY States, 2025-2026 season.
Pybricks program for a LEGO Technic Hub with a two-motor differential drive (left motor on port A, right on port B).
The vehicle follows a smooth sine-shaped curve around the bonus cans and back to the center line:
y(x) = PEAK_OFFSET * (1 - cos(2πx / D)) / 2
It's driven as four equal arcs (left, right, right, left) chained with Stop.NONE, so the vehicle never stops between them. The cruise speed comes from a trapezoidal profile: T = L/v + v/a.
- Edit
TARGET_DISTANCE(mm),TARGET_TIME(ms) andPEAK_OFFSET(mm) at the top ofev2026.py.PEAK_OFFSET = 1000 - can_gap_mm / 2. - Upload with Pybricks Code and press the hub button to run.
The original source was lost. This version was rebuilt from the hub's printed output: 9.5 m, 19.3 s, 900 mm offset, 6492 mm arc radius, 21.46° arc angle, and 9725 mm path length. All of those are reproduced exactly.