Space Force

Originally published at: https://www.brainpad.com/2022/06/02/space-force/

How it works

The BrainPad Pulse and BrainTronics are used to control a servo motor that separates and closes two metal rods at precisely the right time in order to drop a ball in the end slot everytime.

Hardware

The BrainPad Pulse is shown in the example but any of the BrainPad hardware can be used depending on the pin connected.

First you need to acquire one of the classic Space Force games. They are available on Amazon from several retailers.

We attached a 2×4 wood base to the end of the Space Force game, and hot glued the servo motor to the end.

The servo motor used is model KS-3518, it is a high-torque servo capable of moving the arms while still only using 5 volts.

We created a 3d printed servo horn and screwed it onto the servo motor.

Two coat hanger wires were bent to fit into the holes of the servo horn and around the arms of the Space Force game. Squeeze the ends of the wire with pliers to ensure they don’t come loose. The lengh of the wires is 18.5cm and 25.5 cm. (see photo below)

The separation of the two arms should be about 2.5cm where Space Force game meets the 2×4 base.

We used the BrainTronics accessory to attach the servo motor connector to the 5v and GND pins since we need 5v to control the motor. We used an additional yellow wire to attach the female end to our control pin. In the case of the Pulse we used pin 0, and then we bent the other male end and put it inside the control pin of the connector, in this case the yellow wire.

The Code

The code for this was done using Makecode and is available on the BrainPad MakeCode site found under the section titled Showcase Projects.

1 Like