The Snake is built from the Lego Spike Prime educational kit. When the program starts, the snake starts moving, you can change the direction of snake’s movement by acting on the color sensor.
The set includes step-by-step building instruction and an example of program (in Spike environment)
