top of page

LEGO SPIKE Prime Robotics

In my Applications in Engineering: Simple Robotics course my first semester at Tufts, I worked with a Raspberry Pi (programmed with Python) and the LEGO SPIKE Prime Robotics kit before it was officially released to the public to build and code several robotic projects. A new project was due every week (or every two weeks for more involved projects), at which point we would demonstrate our project in class and receive our new assignment. Below are some of these projects.

Driving and Drawing Project

IMG_2096.jpg

(Above) Video demonstration of the robot driving forward/back, spinning in place, spinning about a single wheel, and making an arc.

(Above) Video demonstration of the robot drawing a square.

The goal of this project was to create a robot capable of driving and drawing. My version used two motors for the wheels and the third to lift and place the marker. Unfortunately, the motors did not move very precisely, and it was difficult to ensure it would turn exactly 90 degrees, especially when it moved on different surfaces. Altogether, though, it was a good introduction to the materials and coding involved.

Astronaut Tools

IMG_5692.jpg
IMG_5690.HEIC

The goal of this project was to create a tool that could assist astronauts during an EVA/spacewalk. It had to be able to transfer nuts between bolts while the user wore heavy gloves, similar to those on spacesuits. It also had to be able to work with any orientation (upside down, sideways, etc.) and using either the right or left hand. This would support use in space without gravity and could be used by right-handed or left-handed astronauts. 

We programmed our tool to run when a button was pushed. Pushing the button harder caused the tool to spin faster and releasing the button caused it to switch directions. Correct usage involved placing the head of the tool around the nut, holding the button down until the nut was completely unscrewed, then letting go of the button, shifting the tool to the next bolt, and holding the button down again until the nut was secured.

Color and Distance Sensors

IMG_5716.HEIC

Above is a quick example of using the color sensor to affect robotic function. We made a car with a color sensor facing down. When it sensed green it started at a relatively high speed. If it sensed red, it slowed down significantly. If it sensed blue, it turned 90° left and then it stopped when it sensed yellow.

We also used the distance sensor to affect robotic function. The distance sensor was attached to the SPIKE Prime and programmed so that different ranges of distances played different notes. This was then made to play (a very slow version of) Twinkle Twinkle Little Star.

Trailer Control

Self-correcting demonstration

Parallel Parking

In this project, a trailer attachment was built which was then programmed to be able to drive in a straight line, self-correcting when knocked off course (left) and to parallel park (right). For the parallel parking portion, a distance sensor on the side of the trailer detected an open 'parking spot', and then executed parallel parking code.

Haunted House

This project was used for the 2nd Annual Nolop Makerspace Haunted House. Unfortunately, there are no videos of the project in use at the Haunted House. A piece of candy was placed inside of the skull's mouth. When the user reached inside, a distance sensor triggered the skull closing on the hand. This was to distract the user from the rubber rat also being lowered from the ceiling. The interfaces for the skull and rat were connected via Bluetooth. At the actual Haunted House, robotic components were covered with black cloth, and the rat contraption was mounted on a beam at the ceiling. It was designed to be fully resettable for use many times in one night; The rat reeled itself back up after a moment, and the skull's mouth opened again afterwards, to be ready for the next user.

Robotic Arm

In this project, we made a primitive robotic arm. It was designed to be locked in a row with the robotic arms of other students and pass a ping-pong ball along a line. However, the arm had to be able to pick up the ball at any of the eight locations, and similarly drop the ball off at any location. With the limited time, the arm was not able to let go of the ball, however, it could pick it up and move to the correct end space. The main challenge with this project was not tangling the wires. This was achieved by ensuring the arm spun in the opposite direction if it went one way for too long.

bottom of page