Decorative header image for LEGO SPIKE move Turn Trainer

LEGO SPIKE move Turn Trainer

Master continuous steering control with real-time turn radius previews, velocity insights, and classroom-ready Python code for smooth robot navigation.

By Gray-wolf Content Team Technical Content Specialist
Updated 11/3/2025 ~800 words
robotics LEGO SPIKE Prime move steering turn radius education Python code generator

Executive Summary

The LEGO SPIKE move Turn Trainer bridges the gap between theory and practice for the move() method—LEGO SPIKE Prime’s continuous motion command. Unlike discrete movement commands that stop automatically, the move() method creates ongoing motion that continues until explicitly stopped, making it perfect for sensor-responsive navigation, smooth curved paths, and real-time control scenarios.

What This Tool Does: Provides instant visual feedback showing how steering values translate into turn radii, displays velocity-based speed estimates, and generates ready-to-use Python code complete with safety notes about stopping your robot.

Who It’s For: Robotics educators introducing continuous motion control (grades 6-12), students transitioning from basic move_for_degrees programming to advanced sensor-integrated navigation, and competition teams optimizing path-following algorithms.

Core Value: Eliminates guesswork around steering parameters by showing predicted paths before deploying code, accelerating learning and reducing frustration inherent in trial-and-error approaches.

Key Features Overview

  • Real-Time Turn Radius Visualization: Instantly see the curved path your robot will follow for any steering value from -100 to +100
  • Velocity-Based Distance Estimation: Understand how velocity parameter affects actual travel speed and distance over time
  • Wheel Type Comparisons: Visualize differences between standard and large LEGO wheels
  • Interactive Parameter Controls: Adjust steering, velocity, and wheel configuration with immediate visual updates
  • Python Code Generation: Export complete, annotated code snippets ready for LEGO SPIKE Prime programming environment
  • Safety Guidance: Built-in reminders about the critical importance of stopping continuous motion commands

Feature Tour: Understanding Continuous Motion

Steering Value Control

The centerpiece control is a steering slider ranging from -100 to +100, with 0 representing straight-line motion. This slider directly maps to the move() method’s steering parameter:

Negative Values (-100 to -1): Curve left with increasing tightness

  • -20: Gentle left curve, wide turn radius
  • -50: Moderate left curve, useful for lane changes
  • -80: Sharp left curve approaching pivot turn
  • -100: Left pivot (left wheel stops, right wheel drives)

Zero (0): Straight-line motion—both wheels rotate at equal speeds

Positive Values (1 to +100): Curve right with increasing tightness

  • +20: Gentle right curve, wide turn radius
  • +50: Moderate right curve for navigating between obstacles
  • +80: Sharp right curve for tight maneuvering
  • +100: Right pivot (right wheel stops, left wheel drives)

Visual Feedback: As you drag the slider, the path preview instantly updates showing the predicted arc your robot will follow. The radius of curvature is displayed numerically, helping students understand the quantitative relationship between steering values and physical path geometry.

Velocity Control and Speed Estimation

The velocity parameter (range: -100 to +100) determines motor power level, affecting both speed and torque:

Speed Relationship: The tool displays estimated linear speed based on velocity setting:

  • Velocity 30: ~7 cm/sec (slow, precise control)
  • Velocity 50: ~12 cm/sec (moderate speed, balanced control)
  • Velocity 75: ~18 cm/sec (fast navigation)
  • Velocity 100: ~24 cm/sec (maximum speed, reduced precision)

Distance Over Time: An integrated calculator shows predicted distance traveled for configurable time periods (e.g., “At velocity 50 for 3 seconds, your robot travels approximately 36 cm along its curved path”).

Negative Velocities: Negative values create backward motion following the same steering curves. This is particularly useful for backing out of confined spaces or reversing along a previously traveled path.

Wheel Type Comparison

LEGO SPIKE Prime robots commonly use two wheel sizes:

Standard Wheels (5.6 cm diameter):

  • Most common in educational kits
  • Balanced speed and torque characteristics
  • Circumference: ~17.6 cm per rotation

Large Wheels (8.8 cm diameter):

  • Higher top speed for same velocity value
  • Lower torque (less pushing power)
  • Circumference: ~27.6 cm per rotation

The tool lets you switch between wheel types to see how circumference affects speed estimations. This comparison helps students understand that velocity parameters control motor power, not absolute ground speed—actual speed depends on wheel size.

Turn Radius Visualization

The curved path preview includes numerical turn radius display, calculated based on wheel base width and steering value. Understanding turn radius is crucial for:

Obstacle Avoidance: Knowing your turn radius helps determine minimum clearance needed when navigating around objects

Path Planning: Competition field navigation requires knowing whether your robot can execute specific turns within available space

Sensor Positioning: Understanding where your robot’s sensors will point during turns affects sensor-based navigation strategies

Multi-Robot Coordination: Teams with multiple robots need to plan paths that avoid collisions, requiring awareness of each robot’s turning capabilities

Python Code Generator

Every parameter adjustment generates corresponding Python code in real-time:

from hub import port
import motor_pair
import runloop

async def smooth_curve():
    motor_pair.pair(motor_pair.PAIR_1, port.A, port.B)
    
    # Start continuous curved motion (steering: 35, velocity: 50)
    # Estimated turn radius: 45 cm
    motor_pair.move(motor_pair.PAIR_1, 35, velocity=50)
    
    # IMPORTANT: This starts continuous motion that continues until stopped!
    await runloop.sleep_ms(2000)  # Travel for 2 seconds (~24 cm)
    
    # Stop the motors (REQUIRED to end continuous motion)
    motor_pair.stop(motor_pair.PAIR_1)

runloop.run(smooth_curve())

Smart Annotations: Generated code includes comments explaining:

  • Chosen steering and velocity values
  • Estimated turn radius for spatial planning
  • Approximate distance traveled for given duration
  • Critical safety reminders about stopping motors

Usage Scenarios: From Learning to Competition

Scenario 1: Teaching Steering Fundamentals

Context: Students have mastered move_for_degrees straight-line and fixed-angle turns, but struggle understanding continuous motion control.

Application: The instructor projects the Turn Trainer on the classroom screen. Starting with steering=0 and velocity=40, they click “Start Motion” and students watch the robot travel straight. The instructor gradually increases steering to +20, +40, +60, +80, showing how the path curves progressively tighter.

Students predict what steering=+100 will do before testing (many expect an even tighter curve, surprising them when it becomes a pivot). This demonstration builds intuition about steering’s non-linear relationship to turn radius.

Learning Outcome: Students develop mental models of steering values, enabling them to make educated first guesses rather than random attempts when writing sensor-responsive code.

Scenario 2: Sensor-Integrated Line Following

Context: Advanced students are implementing line-following algorithms that adjust steering based on color sensor readings.

Application: Students use the Turn Trainer to determine appropriate steering ranges for their algorithm:

  • On target line: steering=0 (straight)
  • Slightly off left: steering=+15 (gentle correction)
  • Significantly off left: steering=+35 (moderate correction)
  • Lost line entirely: stop and execute search pattern

By visualizing these steering values before testing, students establish reasonable parameter ranges, then fine-tune based on actual sensor response times and robot momentum.

Learning Outcome: Students produce line-following code that makes smooth, appropriate corrections rather than jerky over-corrections that cause oscillation around the target line.

Scenario 3: Competition Path Optimization

Context: A robotics team needs their robot to navigate a curved path between obstacles spaced 60 cm apart, covering approximately 2 meters.

Application: Team members use the Turn Trainer to identify steering values that create appropriate turn radii:

  • Initial test: steering=+30 creates ~60 cm radius—too wide, robot clips obstacle
  • Adjustment: steering=+45 creates ~40 cm radius—fits path width with 10 cm clearance on each side

They calculate that at velocity=60, the path takes approximately 4 seconds. The generated code provides a starting template, which they refine during practice to account for acceleration/deceleration.

Learning Outcome: The team completes path optimization in 45 minutes instead of the 3+ hours of trial-and-error their previous competition required.

Scenario 4: Differential Drive Intuition Building

Context: Students preparing for advanced tank drive programming need to understand how differential wheel speeds create turns.

Application: The instructor uses the Turn Trainer to explain that steering essentially creates differential speeds between left and right motors. At steering=+50, the right motor runs at ~50% of the left motor’s speed, causing rightward curvature.

Students experiment with different steering values while watching the motor speed indicators, building intuition they’ll apply when manually controlling left/right motors independently with move_tank methods (see LEGO SPIKE move_tank Maneuver Studio).

Learning Outcome: When students later encounter explicit left/right motor control, they already understand conceptually how differential speeds create curved paths.

Code Examples: Practical Applications

Example 1: Simple Curved Navigation

from hub import port
import motor_pair
import runloop

async def navigate_curve():
    motor_pair.pair(motor_pair.PAIR_1, port.A, port.B)
    
    # Gentle right curve around obstacle
    motor_pair.move(motor_pair.PAIR_1, 25, velocity=40)
    await runloop.sleep_ms(3000)  # Curve for 3 seconds
    
    # Stop motion
    motor_pair.stop(motor_pair.PAIR_1)

runloop.run(navigate_curve())

Use Case: Navigating around a single obstacle when you know approximate required curve duration.

Example 2: Sensor-Responsive Steering

from hub import port
import color_sensor
import motor_pair
import runloop

async def follow_line():
    motor_pair.pair(motor_pair.PAIR_1, port.A, port.B)
    
    for _ in range(100):  # Check sensor 100 times
        reflection = color_sensor.reflection(port.C)
        
        if reflection > 70:  # On white (off line to right)
            motor_pair.move(motor_pair.PAIR_1, -30, velocity=40)  # Steer left
        elif reflection < 30:  # On black (off line to left)
            motor_pair.move(motor_pair.PAIR_1, 30, velocity=40)  # Steer right
        else:  # On line edge (target zone)
            motor_pair.move(motor_pair.PAIR_1, 0, velocity=40)  # Straight
        
        await runloop.sleep_ms(50)  # Check every 50ms
    
    motor_pair.stop(motor_pair.PAIR_1)

runloop.run(follow_line())

Use Case: Basic line-following with steering adjustments based on reflected light intensity.

Example 3: Sequential Curve Sections

from hub import port
import motor_pair
import runloop

async def s_curve_path():
    motor_pair.pair(motor_pair.PAIR_1, port.A, port.B)
    
    # Section 1: Right curve
    motor_pair.move(motor_pair.PAIR_1, 40, velocity=50)
    await runloop.sleep_ms(2000)
    
    # Section 2: Left curve (S-curve)
    motor_pair.move(motor_pair.PAIR_1, -40, velocity=50)
    await runloop.sleep_ms(2000)
    
    # Section 3: Straight finish
    motor_pair.move(motor_pair.PAIR_1, 0, velocity=50)
    await runloop.sleep_ms(1500)
    
    motor_pair.stop(motor_pair.PAIR_1)

runloop.run(s_curve_path())

Use Case: Creating complex curved paths by chaining multiple motion segments with different steering values.

Troubleshooting: Common Issues and Solutions

Issue: Robot Path Doesn’t Match Predicted Curve

Possible Causes:

  1. Wheel base width in visualizer doesn’t match actual robot configuration
  2. Surface friction differs significantly from calibration surface
  3. Battery voltage too low, reducing effective motor power
  4. Mechanical slop in drivetrain causing differential wheel speeds

Solutions:

  • Measure and input exact wheel base width (center-to-center of wheels)
  • Recalibrate on the actual competition/demonstration surface
  • Ensure battery is >40% charged for consistent motor performance
  • Check all mechanical connections for tightness and alignment

Issue: Robot Doesn’t Stop After move() Command

Cause: By design! The move() method creates continuous motion that persists until explicitly stopped.

Solution: Always pair move() commands with either:

  • Time-limited motion: await runloop.sleep_ms(duration) followed by motor_pair.stop()
  • Sensor-triggered stop: Check sensor condition in loop, break and stop when condition met
  • Distance-based stop: Track position using motors’ rotation sensors, stop when target reached

Issue: Jerky Motion When Changing Steering Values

Cause: Abrupt steering changes force motors to quickly adjust speeds, causing mechanical stress and jerky motion.

Solution: Implement gradual steering changes:

# Gradually transition from steering=0 to steering=40
for steer in range(0, 41, 5):  # Increment by 5
    motor_pair.move(motor_pair.PAIR_1, steer, velocity=50)
    await runloop.sleep_ms(100)

Issue: Robot Curves More Sharply Than Expected

Possible Causes:

  • Wheel base width input too small
  • One wheel has more friction/resistance than the other
  • Motor calibration drift requiring rebalancing

Solutions:

  • Remeasure wheel base width carefully (center of left wheel to center of right)
  • Test both motors independently to identify mechanical issues
  • Use LEGO’s motor calibration feature if available in your programming environment

Frequently Asked Questions

Q: When should I use move() instead of move_for_degrees()? A: Use move() when you need real-time steering adjustments based on sensor feedback (line following, obstacle avoidance) or smooth continuous motion. Use move_for_degrees() when you need precise, repeatable movements that automatically stop.

Q: Can I change steering value while robot is already moving? A: Yes! That’s one of move()‘s powerful features. You can continuously update steering values in response to sensor readings, creating responsive navigation.

Q: Why does my robot sometimes continue moving after code should have stopped it? A: Check for infinite loops or conditions that never become false. Also ensure stop() commands execute—if exception/error occurs before reaching stop(), motors continue indefinitely.

Q: How do I calculate exact distance for a curved path? A: Curved path distance depends on both time and velocity. The tool provides estimates. For precision requirements, use encoders to track actual wheel rotations or combine with LEGO Wheel Distance Explorer calculations.

Q: How do I calculate exact distance for a 3D curved path? A: Curved path distance depends on both time and velocity. The tool provides estimates. For precision requirements, use encoders to track actual wheel rotations or combine with LEGO Wheel Distance Explorer 3D calculations.

Q: What’s the relationship between steering values and tank drive velocities? A: Steering essentially implements differential tank velocities automatically. Steering=+50 roughly equivalent to left motor at 100% and right motor at 50% in tank drive. Explore this further with LEGO SPIKE move_tank Maneuver Studio.

Q: Can I use move() for backward curved paths? A: Yes! Use negative velocity values. Steering direction remains consistent (positive=right, negative=left) whether moving forward or backward.

Accessibility Considerations

Keyboard Navigation: All controls support full keyboard operation—Tab to navigate, arrow keys to adjust sliders, Space/Enter to activate buttons.

Screen Reader Support: ARIA labels describe all interactive elements and provide value updates as controls change.

Visual Alternatives: Numeric readouts accompany all visual path previews. Turn radius, velocity, and estimated distance displayed textually.

Motor Impairment Accommodations: Slider controls include +/- buttons for precise adjustments without requiring fine motor control for dragging.

Cognitive Clarity: Information organized in progressive layers—basic visualization first, detailed calculations available but not overwhelming initially.

Expand your robotics programming capabilities:

References

  • Official LEGO Education SPIKE Prime API documentation
  • “Differential Drive Robotics” - Educational Robotics Handbook
  • FIRST LEGO League programming best practices guide
  • Gray-wolf Tools complete robotics toolbox

Ready to master smooth robot navigation? Start experimenting with steering values now and transform your robot from jerky turn-stop-turn sequences into gracefully flowing motion.