LEGO Education SPIKE Prime

Python program to move forward, turn left, move forwad, turn right with LEGO Education SPIKE Prime
This program makes the robot move forwards, turn left, move forwards, and then turn right using LEGO Education SPIKE App Python.
from spike import PrimeHub, LightMatrix, Button, StatusLight, ForceSensor, MotionSensor, Speaker, ColorSensor, App, DistanceSensor, Motor, MotorPair from spike.control import wait_for_seconds, wait_until, Timer from math import * hub = PrimeHub() motor_pair = MotorPair('A', 'B') # Set the motor ports in the motor_pair. motor_pair.set_default_speed(50) # Set the default speed of the motor_pair. motor_pair.set_motor_rotation(17.6, 'cm') # Set the distance that the robot travels for one rotation of its wheels. The value 17.6 comes from # the diameter of the wheel (5.6cm) multiplied by "π" (3.14). motor_pair.move(50,'cm', 0, 50) # Start moving for 50cm with NO Steering '0' at 50% of the maximum speed. motor_pair.move(8.8,'cm', -100, 50) # Start moving for 8.8cm with steering '-100' at 50% of the maximum speed. This makes the robot turn left 90deg # at 50% of the maximum speed of the motors. The value 8.8 represents the angle of rotation. This is the distance every # wheel needs to travel to rotate the robot 90deg. This value is calculated in the following way: The wheel base # (the distance between the points where the wheels touch the ground) is the # diameter of the turn (in this case it is 11,2cm). Since we want to turn 90deg (1/4 of the turn) we multiply # the diameter (11,2) by "π" (3.14) and divide it to 4 as 90 degrees are 1/4 of the circle. motor_pair.move(40,'cm', 0, 50) # Start moving for 50cm with NO Steering '0' at 50% of the maximum speed. motor_pair.move(8.8,'cm', 100, 50) # Start moving for 8.8cm with steering '100' at -50% of the maximum speed. This makes the robot turn right 90deg # at 50% of the maximum speed of the motors. Turn right because the steering is positive 100%. raise SystemExit # Close the program.
- #2xvw1d
- 12 Mar 2021

Robotistka, a competition box robot from LEGO Education SPIKE Prime, with 3D building instructions
With Robotistka we can almost use the full potential of the LEGO Education SPIKE Prime robot to prepare for robotics competitions like FIRST LEGO League. It is small, it is a Box Robot, it has two motors at the front and two color sensor for the line.
.- #1280
- 24 Apr 2021

Whakatae V2 - LEGO Education SPIKE Prime Competition Box robot
This incredibly compact SPIKE Prime Box Robot is made for competitions like FIRST LEGO League (FLL) and World Robotics Olympiad (WRO). Whakatae (from Maori's word "whakataetae", which means "competitive") is long 17 LEGO units and is with a width of 15 LEGO units. In front of the wheels it has two color sensors which it uses to align. Whakatae also has two Large motors for moving and has two medium motors for attachments!
It's has "V2" in its name, because it's the second version of Whakatae - LEGO Education SPIKE Prime Competition Box robot. The difference between the two is that the first one can be built with only a Large Motor and a Color sensor in addition to the Base set, while this one needs an additional ball bearing. This provides this robot with a lot more stability and can be seen as a true upgrade to the first version.
- #1282
- 15 Jun 2021


FLL 2020: 10 out of 10 on how to accomplish the Pull-Up bar mission
In this video tutorial we accomplish a robotics competition mission model and we accomplish it 10 out of 10 times. The mission is Pull-up from the FIRST LEGO League 2020 RePLAY competition. The goal of the mission is to pull up the robot on the bar. The robot must not be touching the ground.
- #1753
- 24 Sep 2021


How to use the force sensor event block in LEGO SPIKE Prime Word Blocks software
Here's one way to program using a force sensor:
- #2034
- 01 Jul 2022


Rotation degrees of robots and their wheels
How much does a robot move when it turns 90°? How does this compare to a wheel turning 90°? What’s the difference?
- #2160
- 23 Jul 2024

Names of some of the important and common pieces in LEGO Mindstorms set
We will cover the names and the basic usage of the parts in our typical robot.
- #345
- 25 Jan 2017

FLL 2023: Alternative model for Virtual Reality Artist FIRST LEGO League 2023-2024 MASTERPIECE
These are 3D Building Instructions for an Alternative Virtual Reality Artist mission model for the FIRST LEGO League 2023-2024 MASTERPIECE competition.
- #2396
- 01 Nov 2024