Comparing LEGO SPIKE Prime Programming : Which is Best for Robotics Competitions? - 1

Does Programming Environment Affect Performance? A Comparison for Robotics Competitions When using LEGO SPIKE Prime for a robotics competition, does the programming environment impact performance? I conducted an experiment to compare different programming environments and see how they affect robot movement. Tested Programming Environments I compared the following four environments: Word Blocks (SPIKE App 3) → Download here Python (SPIKE App 3) → Download here Python (Pybricks) → More info C Language (spike-rt) → GitHub repository Test Method To compare the environments, I ran the following test: The robot moves straight and stops when the color sensor detects red Travel distance before detection: ~30 cm Speed: ~900 deg/s Measure the stopping distance (braking distance) from the moment red is detected until the robot stops completely Conduct five trials for each environment and calculate the average stopping distance The same logic was used for all environments Program Code: Word Blocks (SPIKE App 3) Python (SPIKE App 3) Python (Pybricks) C Language (spike-rt) Robot Configuration I used the following robot setup: Left motor: Port A Right motor: Port B Color sensor: Port C Results: Which Environment Performed Best? Here are the average stopping distances (shorter is better): 24mm - C Language (spike-rt)

Mar 10, 2025 - 07:15
 0
Comparing LEGO SPIKE Prime Programming : Which is Best for Robotics Competitions? - 1

Does Programming Environment Affect Performance? A Comparison for Robotics Competitions
When using LEGO SPIKE Prime for a robotics competition, does the programming environment impact performance? I conducted an experiment to compare different programming environments and see how they affect robot movement.

Tested Programming Environments
I compared the following four environments:

Test Method
To compare the environments, I ran the following test:

  • The robot moves straight and stops when the color sensor detects red
  • Travel distance before detection: ~30 cm
  • Speed: ~900 deg/s
  • Measure the stopping distance (braking distance) from the moment red is detected until the robot stops completely
  • Conduct five trials for each environment and calculate the average stopping distance
  • The same logic was used for all environments

Program Code:

  • Word Blocks (SPIKE App 3) Image description
  • Python (SPIKE App 3) Image description
  • Python (Pybricks) Image description
  • C Language (spike-rt) Image description

Robot Configuration
I used the following robot setup:

  • Left motor: Port A
  • Right motor: Port B
  • Color sensor: Port C Image description

Results: Which Environment Performed Best?
Here are the average stopping distances (shorter is better):

  1. 24mm - C Language (spike-rt)