Arduino IDE code
Uno + L298N. Timed motion needs calibration; it cannot guarantee the simulated path. ENA: D9, IN1: D2, IN2: D3 (left); ENB: D10, IN3: D4, IN4: D5 (right). Remove ENA/ENB jumpers for PWM, share ground, and use a suitable motor supply. Do not power motors from Arduino pins.
Values are examples. Measure a forward run and a pivot turn at this PWM, then divide elapsed milliseconds by distance or angle. Check motor direction with wheels raised first. Sketch waits for R in Serial Monitor (9600 baud), runs once, then stops. Send S to stop during a run.
Arduino PWM referenceMoves: cm Turns: degrees Wait: seconds. Editing resets playback.