SPIKE Prime Robotics Camp — Day 1
Teach your robot to move
Each day upgrades our robot.
Teach your robot to:
The robot does exactly what you tell it.
Bugs are data.
The robot did exactly what the code said.
What did the code actually say?
Give a teammate literal step commands to reach a target.
"Forward 2 steps… turn right… forward 1 step."
If they end up in the wrong spot — that's data!
code.pybricks.com in Chrome or EdgeSame robot, same ideas. Pybricks can show the Python next to your blocks.
robot.straight(200) # 200 millimeters forward
Distance is in millimeters. 1000 mm = 1 meter.
robot.turn(90) # positive = right
robot.turn(-90) # negative = left
Turning is in degrees.
DirectionThis is normal setup, not a broken robot.
for LoopA square is the same two moves, four times.
for i in range(4):
robot.straight(300)
robot.turn(90)
Predict it first, then run it!
The numbers are guesses — you measure and adjust.
robot.straight(1000)wheel_diameterwheel_diameterrobot.turn(360)axle_track and try againTune distance first, then turning.
Get up, move, refuel.
Keep food away from the kits and laptops!
Calibrate, then drive your square.
"Pretty close" is a win today.
for loops repeat movesMaze Runner
We'll give our moves names —
like forward_one_cell() and turn_right() —
and string them together to solve a maze.