Interactive Assignment

by bnava6 in Craft > Digital Graphics

185 Views, 0 Favorites, 0 Comments

Interactive Assignment

interactiveassignment.mp4

A simple interactive toy that changes colors and makes different sounds depending on which side is activated with the touch of copper wires.

Supplies

  • 6 Alligator Clips
  • 1 CPX
  • 2 Neo Pixel Lights
  • 2 5cm Pieces of Copper Tape
  • 1 Battery Pack
  • 1 USB Cable
  • Laptop

Code in Adafruit

03.png
  1. Connect the CPX with a USB cable to a laptop.
  2. Open up a new project in https://makecode.adafruit.com/
  3. To begin set the brightness and volume levels

Interactive Inputs

02.png

Then choose the wanted sounds and animations that will play with each touch

Neo Pixel Lights

01.png

Set the color of the Neo Pixels and CPX that will activate upon shake

Finished Code

all.png

This is how the code looks altogether

Setting Up

cpxwires.jpg

Connect the alligator clips to the correct spots on the CPX as shown in the image. Tape the pieces of copper wire upside down with the white side showing up.

Connect to Neo Pixels

Neopixel1.jpg
neopixel2.jpg

Connect the Neo Pixels in the correct positions as shown in the image

Attach Battery

battery.jpg

Connect the JST 2 pin cable to the CPX and connect to a battery pack. Now the CPX will function even without being connected to a laptop via USB.

Upgrade

In the next project I plan to attach the CPX into a small box so that different locations of the box will be interactive. For now I carried around the CPX and placed it near my cat so they could play with the copper wires. I would consider attaching something to the copper wires, like a feather, to make it more interesting. I would like to connect a motor to the CPX too so that there will be a spinning function to entertain but I would need to figure out how to connect it all with the space I have left. For the final project I would also be adjusting anything else from what I just did if I figure out a better way to do it when it includes the box.