Rainbow Swing

When you lightly swing the swing, a piece of candy pops out. How magical is that!?

Actually once you understand how this works, you can make one too. When the swing wobbles, the light sensor underneath senses a change, which controls the servo motor. The servo turns and out pops the candy.

Follow these steps to make your own!

Time: 20 minutes        Help document

Codecraft Online      Start create online >

Step 1  Gather Materials

  • Cardboard for laser cutting (dimensions of at least 460*260mm, 2mm thickness, cutting template PDF available for download)
  • Rivets x 2, to connect the rainbow and the base
  • String or thin rope (min length 250mm, 2mm diameter for the swing)
  • Main board x 1, for programming
  • Photosensor – reacts to changes in light
  • Battery x 1, to supply electricity
  • servo x 1, Actuator to push candy out
  • some candy
  • mini toy or figurine, to add weight to help the weight swing, and be cute.

Step 2 Coding and Testing

For an added challenge, with the explanation in the intro, you can code this program yourself without reading below, this way you will learn more than copying the following program provided.

Step 3:Connect the rainbow with the base

We need cardboard pieces no.3 and 7, and two rivets. Fold piece 3 as demonstrated in the photo, paying careful attention to the direction of the folds.

Match up positions A and B on both segments No.3 and 7, using a rivet to fix in place.

P 3-3 shows what it will look like after this step.

Step 4: Build the candy bin

Gather cardboard segments No.1,2 and 6, according to the steps in the following photos, connect pieces 1,2,3, 6 and 7 together. Carefully examine photos for indication of direction and positioning (especially No. 1, 2 and 3) .

P4-4 is how the Rainbow Swing should look after step 4.


1 thought on “Rainbow Swing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: