# Halo Energy Sword RP2040

## Overview

https://youtu.be/l13BLTXoWiU

You can build the iconic Energy Sword from the Halo video game series and TV show.

We've upgraded our original project to feature motion activated sound effects powered by CircuitPython and the Prop-Maker Feather RP2040.

![led_strips_turn-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/130/036/medium640thumb/led_strips_turn-loop.jpg?1715656187)

This dev-board is our favorite go-to that’s designed for making prop projects. It’s got the RP2040 chip with built-in audio amplifier, accelerometer and 5V NeoPixel level shifting.

A 2000mAh lipo battery will provide several hours of energy and can be recharged over USB.

The 3D printed blade is 86cm (34in) tall and the whole sword weighs just under 1 pound.

![led_strips_hero-board-wide.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/007/medium640/led_strips_hero-board-wide.jpg?1715647437)

CircuitPython has made our Prop-Maker projects easier than ever thanks to our new demo code and libraries.

Dev-boards with CircuitPython are great for props because they load just like a USB flash drive so you can easily edit code and drag and drop audio files.

![led_strips_code-out.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/008/medium640/led_strips_code-out.jpg?1715647597)

When the prop is idle, the LEDs slowly fade with a looping sound effect in the background.

When the accelerometer detects a swing, it triggers a blast-style lighting effect with swooshing sounds.

![led_strips_hero-up.gif](https://cdn-learn.adafruit.com/assets/assets/000/130/038/medium640thumb/led_strips_hero-up.jpg?1715656302)

## Parts
![](https://cdn-learn.adafruit.com/assets/assets/000/130/011/medium800/led_strips_parts.jpg?1715648232)

### Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier

[Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier](https://www.adafruit.com/product/5768)
The Adafruit Feather series gives you lots of options for a small, portable, rechargeable microcontroller board. By picking a feather and stacking on a FeatherWing you can create advanced projects quickly. One popular combo is our [Feather M4](https://www.adafruit.com/product/3857)...

In Stock
[Buy Now](https://www.adafruit.com/product/5768)
[Related Guides to the Product](https://learn.adafruit.com/products/5768/guides)
![Video of a white hand pressing a button to briefly turn an LED strip into white lights. Also wired up to the microcontroller are a servo motor and a speaker.](https://cdn-shop.adafruit.com/product-videos/640x480/5768-09.jpg)

### Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m

[Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m](https://www.adafruit.com/product/2959)
So thin. So mini. So teeeeeeny-tiny. It's the 'skinny' version of our classic NeoPixel strips!

These NeoPixel strips have 60 digitally-addressable pixel Mini LEDs per meter and are very affordable and are only 7.5 mm wide, 5 mm if you remove the strip from the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2959)
[Related Guides to the Product](https://learn.adafruit.com/products/2959/guides)
![Adafruit NeoPixel Digital RGB LED Strip with all the LEDs lighting in a rainbow pattern.](https://cdn-shop.adafruit.com/product-videos/640x480/2959-05.jpg)

### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
![Small, black, SPDT slide switch.](https://cdn-shop.adafruit.com/640x480/805-03.jpg)

### Lithium Ion Battery - 3.7V 2000mAh

[Lithium Ion Battery - 3.7V 2000mAh](https://www.adafruit.com/product/2011)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 2000mAh. If you need a larger (or smaller!) battery,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2011)
[Related Guides to the Product](https://learn.adafruit.com/products/2011/guides)
![Lithium Ion Polymer Battery 3.7v 2000mAh with JST 2-PH connector](https://cdn-shop.adafruit.com/640x480/2011-05.jpg)

### Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt

[Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/4227)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/4227)
[Related Guides to the Product](https://learn.adafruit.com/products/4227/guides)
![Mini Oval Speaker with Short Wires ](https://cdn-shop.adafruit.com/640x480/4227-06.jpg)

### 1.25mm Pitch 2-pin Cable Matching Pair - 40cm long

[1.25mm Pitch 2-pin Cable Matching Pair - 40cm long](https://www.adafruit.com/product/4720)
When 0.1" is too big, and JST PH's too chunky, these ultra-slim 1.25mm connectors are a reliable alternative. These are only 1.25mm pitch, but have a nice clicky connection.

These cables are&nbsp;nice and long, 40cm in fact. They've&nbsp;got both small form factor and are a...

In Stock
[Buy Now](https://www.adafruit.com/product/4720)
[Related Guides to the Product](https://learn.adafruit.com/products/4720/guides)
![1.25mm Pitch 2-pin Cable Matching Pair](https://cdn-shop.adafruit.com/640x480/4720-04.jpg)

### Part: Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long
quantity: 1
Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long
[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3889)

### Part: Ivory White PLA
quantity: 1
Ivory White PLA
[Ivory White PLA](https://amzn.to/3yjE4d8)

### Part: Silver Glitter PLA
quantity: 1
Silver Sparkly Glitter Shining PLA
[Silver Glitter PLA](https://amzn.to/4bDgbvi)

### Part: M2x8mm Screws
quantity: 1
78x, yes 78 M2x8mm screws are need
[M2x8mm Screws](https://amzn.to/3K0Ag36)

### Part: M2.5x8mm Screws
quantity: 23
M2.5x8mm Screws
[M2.5x8mm Screws](https://amzn.to/4bxvHZE)

# Halo Energy Sword RP2040

## Circuit Diagram

The diagram below provides a general visual reference for wiring of the components once you get to the **Assembly** page. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Adafruit uses the Adafruit's Fritzing parts library to create circuit diagrams for projects. You can download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/130/040/medium800/led_strips_circuit-diagram.jpg?1715691969)

## Wired Connections

- The NeoPixel strip and speaker are each connected to pins on the screw block terminal.
- The slide switch is connected to the EN and GND pins on the Feather.
- The lipo battery is connected to the battery port on the Feather via a 2 Pin JST Plug.

# Halo Energy Sword RP2040

## 3D Printing

## 3D Printed Parts

STL files for 3D printing will need to be oriented for print using either FDM or SLS machines.

Parts were tested using with PLA filament.

Original design source files may be downloaded using the links below.

![led_strips_parts-3d.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/012/medium640/led_strips_parts-3d.jpg?1715648658)

[Edit Design](https://a360.co/3wKfbqp)
[Download CAD source](https://cdn-learn.adafruit.com/assets/assets/000/130/052/original/CAD.zip?1715711003)
[Download STLs](https://cdn-learn.adafruit.com/assets/assets/000/130/055/original/HaloEnergySword-STLs.zip?1715712694)
[STLs on Thingiverse ](https://www.thingiverse.com/thing:6622084)
## Slice with Settings for PLA material&nbsp;

The parts were sliced using CURA using the slice settings below.

- PLA filament 200c extruder
- 0.25 layer height
- 10% gyroid infill
- 60mm/s print speed
- 60c heated bed

![led_strips_slice.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/013/medium640/led_strips_slice.jpg?1715649208)

## Supports

- Placement: Everywhere
- Support Overhang Angle: 80
- Support Destiny: 3%
- Enable Support Interface
- Enable Support Roof
- Support Z Distance: .21

![led_strips_slice2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/014/medium640/led_strips_slice2.jpg?1715649377)

## Build Volume

The parts require a 3D printer with a minimum build volume.

- 280(X) x 280 (Y) x 150mm Z

![led_strips_max-bed-size.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/054/medium640/led_strips_max-bed-size.jpg?1715711647)

![](https://cdn-learn.adafruit.com/assets/assets/000/130/015/medium800thumb/led_strips_hero-glow-loop.jpg?1715649619)

# Halo Energy Sword RP2040

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_feather_rp2040_prop_maker/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/121/865/medium800/adafruit_products_boot_reset.jpg?1686710555)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# Halo Energy Sword RP2040

## Code

The code is easily adaptable and because it's CircuitPython, you can make an edit, hit save and quickly see your changes without having to compile the code!

![led_strips_code-drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/034/medium640/led_strips_code-drive.jpg?1715655645)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Halo_Energy_Sword/code.py

## Upload the Code and Libraries to the RP2040 Prop-Maker Feather

After downloading the Project Bundle, plug your RP2040 Prop-Maker Feather into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called **CIRCUITPY**. Unzip the folder and copy the following items to the RP2040 Prop-Maker Feather's **CIRCUITPY** drive.

- **lib** folder
- **sounds** folder
- **code.py**

Your RP2040 Prop-Maker Feather **CIRCUITPY** drive should look like this after copying the **lib** folder, **sounds** folder and the **code.py** file.

![](https://cdn-learn.adafruit.com/assets/assets/000/130/043/medium800/led_strips_cp-drive.jpg?1715697476)

## How the CircuitPython Code Works

At the top of the code, you can customize a few attributes for your sword:

- `COLOR` and `ALT_COLOR` affect the NeoPixel color of the sword.
- `IDLE_PULSE_SPEED` and `SWING_BLAST_SPEED` affect the NeoPixel pulse speed.
- &nbsp;`IDLE_PULSE_BRIGHTNESS_MIN` and `_MAX` affect the NeoPixel brightness range.
- &nbsp;`HIT_THRESHOLD` and `SWING_THRESHOLD` affect the motion sensitivity of the sword.

```python
# CUSTOMISE COLORS HERE:
COLOR = (0, 120, 120)      # Default idle is light blue
ALT_COLOR = (255, 50, 0)  # hit color is orange

# CUSTOMISE IDLE PULSE SPEED HERE: 0 is fast, above 0 slows down
IDLE_PULSE_SPEED = 0  # Default is 0 seconds
SWING_BLAST_SPEED = 0.0007

# CUSTOMISE BRIGHTNESS HERE: must be a number between 0 and 1
IDLE_PULSE_BRIGHTNESS_MIN = 0.2  # Default minimum idle pulse brightness
IDLE_PULSE_BRIGHTNESS_MAX = 1  # Default maximum idle pulse brightness

# CUSTOMISE SENSITIVITY HERE: smaller numbers = more sensitive to motion
HIT_THRESHOLD = 250
SWING_THRESHOLD = 150
```

## NeoPixels, Audio and Accelerometer

The NeoPixels, I2S amp, and accelerometer are instantiated.

```python
NUM_PIXELS = 73  # Number of pixels used in project
NEOPIXEL_PIN = board.EXTERNAL_NEOPIXELS

enable = digitalio.DigitalInOut(board.EXTERNAL_POWER)
enable.direction = digitalio.Direction.OUTPUT
enable.value = True

strip = neopixel.NeoPixel(NEOPIXEL_PIN, NUM_PIXELS, brightness=1, auto_write=False)
strip.fill(0)  # NeoPixels off ASAP on startup
strip.show()

# i2s audio
audio = audiobusio.I2SOut(board.I2S_BIT_CLOCK, board.I2S_WORD_SELECT, board.I2S_DATA)
wave_file = None

# Set up accelerometer on I2C bus, 4G range:
i2c = board.I2C()  # uses board.SCL and board.SDA
# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
accel = adafruit_lis3dh.LIS3DH_I2C(i2c)
accel.range = adafruit_lis3dh.RANGE_4_G
```

## Functions

There are a few functions that are used throughout the loop. `play_wav()` plays the sound effects that are contained in the **/sounds** folder.

```python
def play_wav(name, loop=False):
    """
    Play a WAV file in the 'sounds' directory.
    :param name: partial file name string, complete name will be built around
                 this, e.g. passing 'foo' will play file 'sounds/foo.wav'.
    :param loop: if True, sound will repeat indefinitely (until interrupted
                 by another sound).
    """
    global wave_file  # pylint: disable=global-statement
    print("playing", name)
    if wave_file:
        wave_file.close()
    try:
        wave_file = open('sounds/' + name + '.wav', 'rb')
        wave = audiocore.WaveFile(wave_file)
        audio.play(wave, loop=loop)
    except OSError:
        pass # we'll just skip playing then
```

The `power_on()` function animates the NeoPixels and plays the sound effect when the sword powers up.

```python
def power_on(sound, duration):
    """
    Animate NeoPixels with accompanying sound effect for power on.
    :param sound: sound name (similar format to play_wav() above)
    :param duration: estimated duration of sound, in seconds (>0.0)
    """
    prev = 0
    start_time = time.monotonic()  # Save audio start time
    play_wav(sound)
    while True:
        elapsed = time.monotonic() - start_time  # Time spent playing sound
        if elapsed > duration:  # Past sound duration?
            break  # Stop animating
        animation_time = elapsed / duration  # Animation time, 0.0 to 1.0
        threshold = int(NUM_PIXELS * animation_time + 0.5)
        num = threshold - prev  # Number of pixels to light on this pass
        if num != 0:
            strip[prev:threshold] = [ALT_COLOR] * num
            strip.show()
            prev = threshold
```

The `mix()` function mixes the two NeoPixel colors together.

```python
def mix(color_1, color_2, weight_2):
    """
    Blend between two colors with a given ratio.
    :param color_1:  first color, as an (r,g,b) tuple
    :param color_2:  second color, as an (r,g,b) tuple
    :param weight_2: Blend weight (ratio) of second color, 0.0 to 1.0
    :return (r,g,b) tuple, blended color
    """
    if weight_2 < 0.0:
        weight_2 = 0.0
    elif weight_2 > 1.0:
        weight_2 = 1.0
    weight_1 = 1.0 - weight_2
    return (int(color_1[0] * weight_1 + color_2[0] * weight_2),
            int(color_1[1] * weight_1 + color_2[1] * weight_2),
            int(color_1[2] * weight_1 + color_2[2] * weight_2))
```

## The Loop

In the main loop, the `mode` number determines the functionality of the sword. The first time the code runs, `mode` is `0`. This triggers the sword to initiate the `power_on` function and then go into idle mode where `mode` is `1`.

```python
if mode == 0:  # If currently off...
        enable.value = True
        power_on('on', POWER_ON_SOUND_DURATION)  # Power up!
        play_wav('idle', loop=True)  # Play idle sound now
        mode = 1  # Idle mode

        # Setup for idle pulse
        idle_brightness = IDLE_PULSE_BRIGHTNESS_MIN
        idle_increment = 0.01
        strip.fill([int(c*idle_brightness) for c in COLOR])
        strip.show()
```

If `mode` is `1`, then the accelerometer is read. If the accelerometer's reading is greater than the movement thresholds then the sword will either perform the hit or swing modes with light and sound effects. Otherwise, the sword remains in idle mode and the NeoPixels pulse.

```python
elif mode >= 1:  # If not OFF mode...
        x, y, z = accel.acceleration  # Read accelerometer
        accel_total = x * x + z * z
        # (Y axis isn't needed, due to the orientation that the Prop-Maker
        # Wing is mounted.  Also, square root isn't needed, since we're
        # comparing thresholds...use squared values instead.)
        if accel_total > HIT_THRESHOLD:  # Large acceleration = HIT
            TRIGGER_TIME = time.monotonic()  # Save initial time of hit
            play_wav(random.choice(hit_sounds))  # Start playing 'hit' sound
            COLOR_ACTIVE = COLOR_HIT  # Set color to fade from
            mode = 3  # HIT mode
        elif mode == 1 and accel_total > SWING_THRESHOLD:  # Mild = SWING
            TRIGGER_TIME = time.monotonic()  # Save initial time of swing
            play_wav(random.choice(swing_sounds))  # Randomly choose from available swing sounds
            # make a larson scanner animation_time
            strip_backup = strip[0:-1]
            for p in range(-1, len(strip)):
                for i in range (p-1, p+2): # shoot a 'ray' of 3 pixels
                    if 0 <= i < len(strip):
                        strip[i] = COLOR_SWING
                strip.show()
                time.sleep(SWING_BLAST_SPEED)
                if 0 <= (p-1) < len(strip):
                    strip[p-1] = strip_backup[p-1]  # restore previous color at the tail
                strip.show()
            while audio.playing:
                pass # wait till we're done
            mode = 2  # we'll go back to idle mode
            
        elif mode == 1:
            # Idle pulse
            idle_brightness += idle_increment  # Pulse up
            if idle_brightness > IDLE_PULSE_BRIGHTNESS_MAX or \
               idle_brightness < IDLE_PULSE_BRIGHTNESS_MIN:  # Then...
                idle_increment *= -1  # Pulse direction flip
            strip.fill([int(c*idle_brightness) for c in COLOR_IDLE])
            strip.show()
            time.sleep(IDLE_PULSE_SPEED)  # Idle pulse speed set above
        elif mode > 1:  # If in SWING or HIT mode...
            if audio.playing:  # And sound currently playing...
                blend = time.monotonic() - TRIGGER_TIME  # Time since triggered
                if mode == 2:  # If SWING,
                    blend = abs(0.5 - blend) * 2.0  # ramp up, down
                strip.fill(mix(COLOR_ACTIVE, COLOR, blend))  # Fade from hit/swing to base color
                strip.show()
            else:  # No sound now, but still SWING or HIT modes
                play_wav('idle', loop=True)  # Resume idle sound
                mode = 1  # Return to idle mode
```

# Halo Energy Sword RP2040

## Assembly

## Align Blade parts

Attach each blade part with M2x8mm screws.

Use a [Pivoting Bit Tip Holder](https://amzn.to/3K1nUrp "Pivoting Bit Tip Holder") and a Philips bit to easily secure parts.

&nbsp;

![led_strips_blade-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/016/medium640/led_strips_blade-parts.jpg?1715649699)

![led_strips_blade-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/017/medium640/led_strips_blade-screws.jpg?1715649826)

## Solder LED strip

Measure wires 130mm long to connect the LED strip to the Feather.&nbsp;

## Place LED strip

Arrange the LED strip between the stand-offs and the wall of the blade.&nbsp;

![led_strips_strip-soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/019/medium640/led_strips_strip-soldered.jpg?1715650042)

![led_strips_strip-placed-halfs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/020/medium640/led_strips_strip-placed-halfs.jpg?1715650084)

## Connect blade halves&nbsp;

Use M2x8mm screws to secure both halves of the blades together.

## Thread wires

Pass the LED strip wires through the handle-top part.

Use M2x8mm screws to connect the blade to the handle-top part.

![led_strips_strip-placed-halfs-closed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/021/medium640/led_strips_strip-placed-halfs-closed.jpg?1715650189)

![led_strips_strip-threaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/022/medium640/led_strips_strip-threaded.jpg?1715650273)

Primary: Repeat this process for the second Blade Assembly 🗡️

## Connector Tabs

Align the connector tabs to the handle parts. Use M2.5x8mm long screws to the secure the tabs to the handle parts.

![led_strips_tabs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/025/medium640/led_strips_tabs.jpg?1715650545)

## Slide Switch and speaker wires

Solder wires to the slide switch and connect to the EN and GND pins on the Feather board.

## Speaker Holder

The oval speaker press-fits into the speaker holder part. Use M2.5x6mm screws to fasten the speaker holder to the stand-offs in the handle.

![led_strips_feather-switch-wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/023/medium640/led_strips_feather-switch-wire.jpg?1715650406)

![led_strips_speaker-holder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/024/medium640/led_strips_speaker-holder.jpg?1715650502)

## Mount Feather and Lipo

Use M2.5x6mm screws to secure the Feather to the stand-offs.

The slide switch press-fits onto the cut outs on the handle part.

Use a loop of gaffers tape to add a cushion to the lipo battery. Place under the Feather board and connect to the JST port.&nbsp;

&nbsp;

![led_strips_feather-mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/026/medium640/led_strips_feather-mounted.jpg?1715650610)

## Align Blade wires

Place blade assemblies close to the handle assembly.&nbsp;

## Connect LED strip wires

Connect each wire to the terminal block on the Feather board.

![led_strips_balde-wire-align.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/027/medium640/led_strips_balde-wire-align.jpg?1715650690)

![led_strips_blade-wire-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/028/medium640/led_strips_blade-wire-connect.jpg?1715650735)

## Attach Handles&nbsp;

Place the two handle halves together and press-fit to join.

## Connect Blades

Press-fit the handle-top parts to the handle and secure with M2.5x8mm screws.

![led_strips_handle-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/029/medium640/led_strips_handle-connect.jpg?1715650798)

![led_strips_handle-top-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/030/medium640/led_strips_handle-top-connect.jpg?1715651032)

## Secure Handles&nbsp;

Use one more M2.5x8mm screw on the middle portion of the handle to join the two parts together.

![led_strips_handle-top-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/130/031/medium640/led_strips_handle-top-screws.jpg?1715650973)

![](https://cdn-learn.adafruit.com/assets/assets/000/130/032/medium800thumb/led_strips_hero-loop.jpg?1715651060)


## Featured Products

### Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier

[Adafruit RP2040 Prop-Maker Feather with I2S Audio Amplifier](https://www.adafruit.com/product/5768)
The Adafruit Feather series gives you lots of options for a small, portable, rechargeable microcontroller board. By picking a feather and stacking on a FeatherWing you can create advanced projects quickly. One popular combo is our [Feather M4](https://www.adafruit.com/product/3857)...

In Stock
[Buy Now](https://www.adafruit.com/product/5768)
[Related Guides to the Product](https://learn.adafruit.com/products/5768/guides)
### Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m

[Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED/m](https://www.adafruit.com/product/2959)
So thin. So mini. So teeeeeeny-tiny. It's the 'skinny' version of our classic NeoPixel strips!

These NeoPixel strips have 60 digitally-addressable pixel Mini LEDs per meter and are very affordable and are only 7.5 mm wide, 5 mm if you remove the strip from the...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2959)
[Related Guides to the Product](https://learn.adafruit.com/products/2959/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### Lithium Ion Battery - 3.7V 2000mAh

[Lithium Ion Battery - 3.7V 2000mAh](https://www.adafruit.com/product/2011)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 2000mAh. If you need a larger (or smaller!) battery,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2011)
[Related Guides to the Product](https://learn.adafruit.com/products/2011/guides)
### Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt

[Mini Oval Speaker with Short Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/4227)
Hear the good news! This wee speaker&nbsp;is&nbsp;a&nbsp;great addition to any audio project where you need 8 ohm impedance and 1W or less of power. We particularly like this&nbsp;speaker&nbsp;as it is&nbsp;small and comes with nice skinny wires with a connector on the end. It has a handy...

In Stock
[Buy Now](https://www.adafruit.com/product/4227)
[Related Guides to the Product](https://learn.adafruit.com/products/4227/guides)
### 1.25mm Pitch 2-pin Cable Matching Pair - 40cm long

[1.25mm Pitch 2-pin Cable Matching Pair - 40cm long](https://www.adafruit.com/product/4720)
When 0.1" is too big, and JST PH's too chunky, these ultra-slim 1.25mm connectors are a reliable alternative. These are only 1.25mm pitch, but have a nice clicky connection.

These cables are&nbsp;nice and long, 40cm in fact. They've&nbsp;got both small form factor and are a...

In Stock
[Buy Now](https://www.adafruit.com/product/4720)
[Related Guides to the Product](https://learn.adafruit.com/products/4720/guides)
### Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 4 Wires 1 Meter Long](https://www.adafruit.com/product/3889)
For those who are fans of our silicone-covered wires, but are always looking to _up their wiring game_. We now have **Silicone Cover Ribbon cables!** These may look _a lot_ like <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3889)
[Related Guides to the Product](https://learn.adafruit.com/products/3889/guides)

## Related Guides

- [Adafruit RP2040 Prop-Maker Feather](https://learn.adafruit.com/adafruit-rp2040-prop-maker-feather.md)
- [CircuitPython BLE Controlled NeoPixel Hat](https://learn.adafruit.com/circuitpython-feather-ble-neopixel-hat.md)
- [Adabot Toy Robot Friend](https://learn.adafruit.com/adabot-rp2040.md)
- [Halo Energy Sword by Mattel NeoPixel Upgrade](https://learn.adafruit.com/halo-energy-sword-by-mattel-neopixel-upgrade.md)
- [LED Snowboard with Motion-Reactive Animation](https://learn.adafruit.com/led-snowboard-with-motion-reactive-animation.md)
- [Prop-Maker Feather Talking Adabot Clock](https://learn.adafruit.com/prop-maker-feather-talking-adabot-clock.md)
- [Gravity Falls Memory Gun](https://learn.adafruit.com/gravity-falls-memory-gun.md)
- [Crickit Powered Maker Ice Cream Truck!](https://learn.adafruit.com/crickit-maker-ice-cream-truck.md)
- [Stomp-Reactive Light Up Slippers](https://learn.adafruit.com/stomp-reactive-light-up-slippers.md)
- [Make a Zelda Master Sword with the RP2040 Prop-Maker Feather](https://learn.adafruit.com/master-sword-rp2040.md)
- [Adafruit NeoPixel Überguide](https://learn.adafruit.com/adafruit-neopixel-uberguide.md)
- [Motion Sensor Bat](https://learn.adafruit.com/motion-sensor-bat.md)
- [Weather Wise Wifi Umbrella Stand](https://learn.adafruit.com/weather-wise-wifi-umbrella-stand.md)
- [Glowing Interactive Crystal Staff ](https://learn.adafruit.com/glowing-interactive-crystal-staff.md)
- [ Faz-Wrench - Five Nights at Freddy's](https://learn.adafruit.com/faz-wrench.md)
- [Zelda: Breath of the Wild – 3D Printed Guardian Sword with NeoPixel LEDs](https://learn.adafruit.com/breath-of-the-wild-guardian-sword-led-3d-printed.md)
