Ladybug Accessories

What’s a Ladybug without accessories? Well, this little Ladybug certainly cannot work to the best of her ability without the proper equipment.

Ladybug Yo-Yo tool

Ladybug’s accessory helps her fight evil Hawk Moth, and the only way she can properly defeat evil is when she has her backup theme music. For this obstacle, a microcontroller with vibration sensors and audio/light capabilities will do the job just fine. The lighting ended up being unnecessary due to the opaque filament and paint, but in other conditions would have been a neat feature.

Yo-yo top of model

Yo-yo bottom of model

Audio and lighting Code

import time import board import busio import digitalio import pwmio import audioio import audiomp3 from rainbowio import colorwheel import neopixel import adafruit_lis3dh tap_count = 0 first_tap_time = 0 tap_cooldown = 50 # 50 milliseconds last_tap_time = 0 tap_window = 1500 # 1.5 seconds in milliseconds current_duty_cycle = 0 increment = 1024 max_duty_cycle = 65535 min_duty_cycle = 0 i2c = busio.I2C(board.SCL, board.SDA) int1 = digitalio.DigitalInOut(board.D6) accel = adafruit_lis3dh.LIS3DH_I2C(i2c, int1=int1) accel.range = adafruit_lis3dh.RANGE_4_G accel.set_tap(1, 100) button = digitalio.DigitalInOut(board.A1) button.switch_to_input(pull=digitalio.Pull.UP) enable = digitalio.DigitalInOut(board.D10) enable.direction = digitalio.Direction.OUTPUT enable.value = True speaker = audioio.AudioOut(board.A0) red = pwmio.PWMOut(board.D11, duty_cycle=0, frequency=20000) green = pwmio.PWMOut(board.D12, duty_cycle=0, frequency=20000) blue = pwmio.PWMOut(board.D13, duty_cycle=0, frequency=20000) while True: current_duty_cycle += increment print("Current Duty Cycle:", current_duty_cycle) if current_duty_cycle >= max_duty_cycle or current_duty_cycle <= min_duty_cycle: increment = -increment # Reverse the direction current_duty_cycle += 2 * increment # This ensures that we don't get stuck at max/min red.duty_cycle = current_duty_cycle green.duty_cycle = current_duty_cycle blue.duty_cycle = current_duty_cycle time.sleep(0.005) # Slow down the loop for observation now = time.monotonic() * 1000 # Current time in milliseconds if now - first_tap_time > tap_window: if first_tap_time != 0: if tap_count == 2: if not speaker.playing: sample = "beeps.mp3" mp3stream = audiomp3.MP3Decoder(open(sample, "rb")) speaker.play(mp3stream) first_tap_time = 0 tap_count = 0 if accel.tapped: if now - last_tap_time > tap_cooldown: last_tap_time = now if first_tap_time == 0: first_tap_time = now tap_count += 1 if tap_count == 3: if speaker.playing: speaker.stop() else: sample = "song.mp3" mp3stream = audiomp3.MP3Decoder(open(sample, "rb")) speaker.play(mp3stream) tap_count = 0 first_tap_time = 0

Buff out all of the uneven layers and imperfections. I went up to a 220 grain for this.

Precautions

Cover the inside beveled edge with painters tape to avoid any future closure headaches. Always sand and spray outside in a well ventilated area while wearing proper breathing protections.

Trying to get an even spray is difficult when nature gets in the way. Note to self: keep bugs away from wet paint.

Apply black vinyl decals for the spots. I did find some creasing laying them across curved edges. Poking the crease with a pin and pressing it down will help further flatten the vinyl. The layer of sealant helped even some of this out in the end. Another option to avoid this altogether is to bring out your trusty bottle cap once more to trace outlines for the spots and paint in with black acrylic.

Holes

Foamcutter was the perfect solution for releasing the speaker holes, but any kind of sharp pokey tool should do the job cutting through vinyl just fine. Finishing polish with a couple layers of high gloss polyurethane.

The inner workings of Ladybug’s accessory. A microcontroller that can play audio and detect vibrations. Turning it on/off took a few taps which was great fun for Ladybug on our trick-or-treating adventure. The light was unnecessary in the end because of the opaque filament and paint, but the intention was there.

Make It An Accessory

Ladybug just could not be without her tooling. String some elastic thread through the holes on the inside and wrap around your subject in whatever fashion they see fit. (They are Ladybug, after all.) Do not be like me, and tape off the inside bevel Before! painting. My closure was too gunked up to fully fit again. Hot glue for the win!

You Are Ladybug!

Fully equipped and ready for action.

Featuring the musical stylings of Ladybug! Featuring the musical stylings of Ladybug! The device turns on/off through tapping. A feature well exercised on our trick-or-treating adventure.