Cup Lamp

Finn and Jake at campfire

A Finn Cup Lamp from Adventure Time!

Finn the Human is a fiery little kid with strong morals who lives in the Land of Ooo. Make your own Finn lamp out of a paper cup that will light up different colors.

Completed Cup Lamp project

Prepare

This project

Level: Medium
Duration: 60 minutes
Flipgrid: https://flipgrid.com/51b13636

Materials

Project materials

Collect the materials in the list before starting your project Make.

Make

Step 1: Print out Templates (or draw) Finn’s outline

You can either print out the templates below, or draw your own on a piece of paper.

Step 2: Cut out 4 strips, and Finn’s silhouette from the paper

Using scissors, cut two pieces of paper in half lengthways, along the drawn lines.

Cutting paper in half with scissors

Cut the inside of Finn’s head out, cut the inside of his hat out, and cut the rolling hills from the Land of Ooo out.

Cutting the shapes out of the paper

Step 3: Assemble paper layers

Position all four strips of paper on top of each other creating a layered image of Finn in the Land of Ooo.

Pieces layered together

Tape the sides of the paper so they will stay together.

Sides of layers taped together

Step 4: Cut out hole in the paper cup

Cut a rectangular opening in the side of the coffee cup approximately 3 inches wide.

Opening gut into the side of the cup

Step 5: Insert the paper in the cup

Roll the paper silhouette of Finn, and insert into the inside of the cup. Secure in place with some tape.

Layers of the the silhouette rolled into the cup

Trim the ends of the paper so they don’t stick out beyond the edge of the cup.

Ends of the laayered silhouette trimmed off

Step 6: Connect the copper tape onto the Pins

Cut 6 strips of copper tape, each about 7 inches long. Keep the backing on the tape for now.

6 pieces of copper tape cut

Thread about an inch of each strip through the holes in the A1 - A6 pins on the Adafruit Circuit Playground Express – you may have to bend the copper tape lengthways to get it to fit through the holes. Make sure the backing of the copper tape is facing up.

Copper tape theaded into the board's pin holes

Carefully remove the backing from the end of the copper tape. You will have to cut the backing around the Pin holes – but be careful not to cut the copper tape. Fold the tape over itself through the pins to secure the connection to the Adafruit Circuit Playground Express. Leave the copper tape backing on the external lengths of tape for now.

Copper tape backing stripped to adhere

All of the pieces of copper tape attached

Step 7: Attach the Battery pack

Insert the batteries into the battery pack.

3 batteries placed into the battery pack

Thread the battery pack wire through the hole in the coffee cup lid and connect the battery pack to the Adafruit Circuit Playground Express.

Battery pack wires threaded through lid

Step 8: Attach the Adafruit Circuit Playground Express

Use a small piece of tape, roll it inside out to form a loop so that the sticky side is on the outside. Attach the tape to the back of the Adafruit Circuit Playground Express board and attach it to the inside of the coffee cup lid. Leave the copper tape strips hanging outside the lid.

Roll of tape on the back of board

The board attached to the inside of the lid

Step 9: Put the lid on the coffee cup

Note - We’ll be closing the lamp in this last step, so before you do this step, jump down to the Coding part to load the code on your Adafruit Circuit Playground Express.

Place the lid upside down on a surface. Carefully place the coffee cup part upside down over the lid, keeping the copper tape strips outside of the cup. Take care to avoid tearing the copper tape as you place the lid on the coffee cup, and make sure the copper tape strips aren’t touching each other.

Once the cup is secure, remove the rest of the backing from the copper tape and affix the strips of copper tape to the outside of the coffee cup. Trim the excess lengths of copper tape.

Cup and lid together with copper tape stuck to sides

Complete!

Congratulations! You have made your own Finn Cup Lamp! Turn on the battery pack and press each of the copper tape switches to see your Lamp change color!

Code

Code your Lamp to show different colors and animations when you press the different pins.

Concepts

  • Light
  • Pixels
  • Brightness
  • Pins

Blocks

input.pinA1.onEvent(ButtonEvent.Click, function () {})
light.setAll(0xff0000)
light.setBrightness(20)

Step 1: Turn the lights different colors when you press a pin

  • Open MakeCode in your web browser
  • Click on New Project

New project button

  • Name your Project as CupLamp (note – you don’t need to click the Save button, just type the name).

Project name box

  • From the ||input:INPUT|| Toolbox drawer, drag out an ||input:on button click|| block onto the Workspace (note – you can ignore or delete the existing ||loops:forever|| block on the workspace. Delete blocks by dragging them back over to the Toolbox menu).

Project name box

  • Right-click on the ||input:on button click|| block, and select Duplicate to make a copy of this block. Do this 4 more times until you have 6 of these blocks on the Workspace.

Duplicated 'on button click' blocks

  • In the ||input:on button click|| block, use the drop-down menu to select Pin A1.

Input selections for 'on button click' block

  • Do this for all the ||input:on button click|| blocks, selecting Pins A1A6.
input.pinA1.onEvent(ButtonEvent.Click, function () {})
input.pinA2.onEvent(ButtonEvent.Click, function () { })
input.pinA3.onEvent(ButtonEvent.Click, function () { })
input.pinA4.onEvent(ButtonEvent.Click, function () { })
input.pinA5.onEvent(ButtonEvent.Click, function () { })
input.pinA6.onEvent(ButtonEvent.Click, function () { })
  • From the ||light:LIGHT|| Toolbox drawer, drag out a ||light:set all pixels|| block to the Workspace, and drop it into the ||input:on pin click|| block.

'set all pixels' placed into 'on pin click' block

  • Do this 5 more times so you have a ||light:set all pixels|| block in all of the ||input:on pin click|| blocks.
  • In the ||light:set all pixels|| blocks, use the drop-down menu to select different colors for each pin.

Color choices for 'set all pixels' block

Step 2: Set the Brightness

  • From the ||loops:LOOPS|| Toolbox drawer, drag an ||loops:on start|| block onto the Workspace.

The 'on start' block pulled out

  • From the ||light:LIGHT|| Toolbox drawer, drag out a ||light:set brightness|| block onto the Workspace and drop into the ||loops:on start|| block. Set the brightness value to 200.

Brightness slider for 'set brightness' block

Your final program may look something like this:

light.setBrightness(200)
input.pinA1.onEvent(ButtonEvent.Click, function () {
    light.setAll(0xff0000)
})
input.pinA2.onEvent(ButtonEvent.Click, function () {
    light.setAll(0xff8000)
})
input.pinA3.onEvent(ButtonEvent.Click, function () {
    light.setAll(0xffff00)
})
input.pinA4.onEvent(ButtonEvent.Click, function () {
    light.setAll(0x00ff00)
})
input.pinA5.onEvent(ButtonEvent.Click, function () {
    light.setAll(0x00ffff)
})
input.pinA6.onEvent(ButtonEvent.Click, function () {
    light.setAll(0x7f00ff)
})

Step 3: Download

Test your program in the Simulator by clicking on each of the Pins A1A6 to see the colors change.

Program running in simulator

Once you’re happy with your program, click the Download button and follow the instructions to download the code to your Adafruit Circuit Playground Express.

Download window

Disconnect the Adafruit Circuit Playground Express from the USB cable, turn on the batteries, close the lid of the cup, and try pressing the copper tape to activate the colors on your lamp.

Great work!