Clap Light That Illuminates Drawing Using CPX & Makecode

by mherbig in Craft > Art

317 Views, 0 Favorites, 0 Comments

Clap Light That Illuminates Drawing Using CPX & Makecode

IMG_8657.JPG
IMG_8656.JPG

Create a Clap Light using the CPX and Makecode by adafruit

This a simple project that will allow any drawing to illuminated!

Supplies

Circuit Playground Express & Makecode by adafruit

Battery with JST 2-pin Cable

Electric Safe Tape

Paper, Scissors, Markers, and a black Pen

Step 1: Code CPX Using Makecode by Adafruit

IMG_8628.JPG
IMG_8625.JPG
IMG_8626.JPG

Plug CPX into computer using USB adapter cable. Visit https://makecode.adafruit.com/ to begin to code CPX.

CPX should light up when plugged in. Press "reset" button until the LEDs turn green. You'll know you are in bootloader mode successfully when all the LEDs turn a green color. Once this happens, your CPX is ready to code.

After accessing Makecode, utilize resources on the website and follow "Clap Light" tutorial. Make sure CPX is synched appropriately. Write code for CPX using resources from website. Pictured above is the code I used to create a Clap Light that turns on periodically triggered by sound. After writing code, download it onto the CPX to save it and activate it.

After coding CPX, test it to check that it works! In this case, clap to see if the LEDs are triggered.

Step 2: Attach CPX to Battery Pack

IMG_8629.JPG
IMG_8631.JPG
IMG_8638.JPG
IMG_8636.JPG

After successfully coding, prepare battery pack to attach to CPX. To do this, I simply connected a JST 2-pin cable using electric wire safe tape to battery pack. Then, plug 2-pin cable into CPX. This should turn CPX on.

After doing this successfully, attach CPX to Battery pack neatly by taping it together.

Step 3: Create Drawing Light Box

IMG_8639.JPG
IMG_8640.JPG
IMG_8641.JPG
IMG_8642.JPG
IMG_8643.JPG

Create a 4 faced box (with equal sides) out of paper. Simply measure and then cut to fix battery pack and CPX.

Draw onto the middle face of the box, get creative! I used alcohol based ink markers to give a saturated effect. After drawing small scene, black out the rest of the faces with sharpie. This will allow the majority of the light to be focused onto the center drawing, creating a light box effect.

After you're finished drawing, assemble box using tape.

Step 4: Lay Box Over CPX and Clap to Illuminate!

IMG_8644.JPG
IMG_8645.JPG
IMG_8647.JPG
IMG_8646.JPG
IMG_8651.JPG

Set box onto CPX on a hard surface. The CPX and Battery pack should fit neatly into box. Clap to illuminate drawing! Set on desk to accent a space, or put on night stand and enjoy in low light.

Enjoy an illuminated drawing! Thanks!

Tip: Turn on music with a notable beat to watch CPX light show. Create multiple drawing boxes to match your mood for the day. :)