Program for Swing Game - LEGO SPIKE Prime robot

This program makes Swing game - LEGO SPIKE Prime robot move the two people according to the input from the controllers!

The color sensor controller uses the colors on the plate above it to determine how to move the LEGO person. If the color is blue, it moves forward, if its purple, it moves backwards, otherwise - it stops!

The motor controller has a similar program, if it has turned more than 30 degrees forward, the LEGO person moves forward, if it has turned more than 30 degrees backward, the LEGO person moves backward, otherwise - it stops.

The goal of the game is for both LEGO people to reach the center, without the swing tipping to either side! Good luck and have fun!

How to open?

Download
  • #q3ih0s
  • 24 Jul 2020

Courses and lessons with this Program

This Program is used in the following courses and lessons

Image for Stay @ Home SPIKE Prime Course
  • 4
  • 0:33
  • 27
Image for Lesson 2 - Swing game
  • 1
  • 2
  • 3d_rotation 1