Velocity Arena · Gotham Tech
This drives your bot for an exact time so you can hit a target line precisely. You set one number — your drive time in milliseconds — download, and press A.
let driveMs = …. Leave everything else alone. Your SPEED is the same stat you used in the Distance Lab — set it once and don't touch it again.SPEED to your team's Speed stat (once).// ═══════════════════════════════════════════════
// TARGET CHALLENGE — hit the line exactly
// 1. Work out your drive time in MILLISECONDS.
// 2. Put it on the ★ line below.
// 3. Download to the bot, then press A.
// ═══════════════════════════════════════════════
let SPEED = 5 // your team's Speed stat (same as the Distance Lab). Set once.
let motorPower = SPEED * 100 / 20
let driveMs = 3600 // ★ CHANGE ONLY THIS NUMBER ★ (your time in ms)
basic.showString("A")
input.onButtonPressed(Button.A, function () {
basic.showString("GO")
CutebotPro.pwmCruiseControl(motorPower, motorPower)
basic.pause(driveMs)
CutebotPro.stopImmediately(CutebotProMotors.ALL)
basic.showString("A")
})
basic.pause counts in milliseconds — thousandths of a second. So 3.6 seconds = 3600 ms. To go from your seconds to ms, multiply by 1000. Example: a drive time of 2.85 s → driveMs = 2850.