Lucky Cat & Spinning Duck

by mmachain in Circuits > Gadgets

361 Views, 0 Favorites, 0 Comments

Lucky Cat & Spinning Duck

IMG_5065.jpeg

The objectives of this project are to make changes to our previous design to create a safe, marketable, design that’s eye-catching, easy to use, and easy to design with 3D printing and coding. The design must include sound, light, and movement with the usage of 3 buttons. And all of these components are obtainable using a CPX kit, servo motor, 3D printed parts, and using Python to make a specific design.

Supplies

2201-01.jpg
I4263-04.jpg

Tinkercad

  1. Create the design on Tinkercad
  2. Download the Tinkercad file as an STL

These images show the duck and cat in TinkerCad

3D Printing

  1. Download the duck and cat STL files from Instructables (attached)

  1. Slice in the desired program (Ex; MakerBot)
  2. Print from your 3D Printer

Downloads

Coding

  1. Download Code With Mu 
  2. Download the CircuitPython Bootloader 
  3. Drag to your CPX 
  4. Download the CircuitPython Library from https://circuitpython.org/libraries (Follow instructions/learn about Python from adafruit )
  5. Copy this code into Python:
  6. Save the code onto your CPX


What the code does:

  • When button A is pressed:
  • The Servo Motor will rotate
  • One sound goes off
  • When button B is pressed:
  • The Servo Motor will stop
  • A different sound goes off
  • When touched, each CPX input lights up a different color (rainbow)

Assembly/Testing

Screenshot 2023-04-09 at 9.11.22 PM.png
  1. Use the wire connected to the battery pack to connect the CPX to the battery pack and clip the CPX onto the front of the lucky cat (*you will need two AA batteries to power the battery pack*)
  2. Place the servo motor in the cut-out in the hand of the cat
  3. String the wire behind the cat from the servo motor to the front
  4. Use the three wires (Blue, Orange, & Yellow) to connect the servo motor to the CPX; attach them according to the function
  5. Attach the 3D-printed duck to the servo motor by placing it on top of the moving part of the servo
  6. Press buttons and touch around the CPX to make sure it makes noise, the duck moves, and the CPX lights up

References

Adafruit Industries, “Unique & fun DIY electronics and kits.” (2005). 

https://www.adafruit.com 

Adafruit MakeCode (n.d.). Adafruit Circuit Playground Express - Blocks / 

Javascript Editor. https://makecode.adafruit.com 

Code With Mu. (2022). Python Code. https://codewith.mu 

Dym, C. L., Little, P., & Orwin, E. J. (2013). Engineering design: a 

project-based introduction (4th ed.). Wiley.

Tinkercad, “From mind to design in minutes.” (2019). Tinkercad. 

https://www.tinkercad.com

3D Printers for Educators & Professionals. (2009). MakerBot. 

https://www.makerbot.com