# Lightsaber Prop-Maker RP2040

## Overview

https://youtu.be/x51i4NLoT6w

![](https://cdn-learn.adafruit.com/assets/assets/000/123/167/medium800/3d_printing_hero-pink.jpg?1690813987)

## An All-in-one Lightsaber

You can build a lightsaber with the Adafruit RP2040 PropMaker Feather. The all-in-one board has everything you need for a fully featured prop. The on-board I2S audio amplifier features digital audio for excellent sound quality. Screw terminals make it easy to connect components like buttons, speakers, and NeoPixels.

## Color Cycle

Change the color of the blade by pressing and holding the push button. Press the button again to cycle through different colors. A looping sound effect lets you know when you are in color changing mode.

## Streamlined Assembly

Building a lightsaber just got a whole lot better, thanks to the RP2040 PropMaker Feather. Less soldering and better access to the USB port makes for a much better building experience. No hardware screws necessary, parts snap fit and fasten together.

## Open Design

The design is open-source and the CAD files are available to download so you can make your own modifications.

If you choose to use an FDM-based machine, no support material is needed. Resin-based printers create exceptional parts that look great.

## Parts
Featured
### 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)

Featured
### Rugged Metal Pushbutton - 16mm 6V RGB Momentary

[Rugged Metal Pushbutton - 16mm 6V RGB Momentary](https://www.adafruit.com/product/3350)
By popular demand, we now have these buttons with a full color RGB LED ring light! These chrome-plated metal buttons are rugged, but certainly&nbsp;not lacking in flair. Simply drill a 16mm hole into any material up to 1/4" thick and you can fit these in place – there's even a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3350)
[Related Guides to the Product](https://learn.adafruit.com/products/3350/guides)
![Video of 16mm rugged metal pushbutton with an RGB LED ring glowing rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/3350-03.jpg)

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

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

These NeoPixel strips have 144 digitally-addressable pixel Mini LEDs per meter and are very affordable and are only 7.5 mm wide (0.3")&nbsp;if you remove the strip from the...

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

Featured
### Mini Oval Speaker - 8 Ohm 1 Watt

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
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...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
![Small, black, oval speaker with Pico Blade connector.](https://cdn-shop.adafruit.com/640x480/3923-06.jpg)

Featured
### Lithium Ion Cylindrical Battery - 3.7v 2200mAh

[Lithium Ion Cylindrical Battery - 3.7v 2200mAh](https://www.adafruit.com/product/1781)
Need a big battery for your project? This lithium-ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage, and over-current protection. Yet, it is slim and easy to fit into many project cases.  
  
This cell can provide 2 **C** of...

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

Featured
### 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)

### Part: Silicone Cover Stranded-Core Ribbon Cable
quantity: 1
10 Wire 1 Meter Long - 28AWG Black
[Silicone Cover Stranded-Core Ribbon Cable](3890)

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

[1.25mm Pitch 4-pin Cable Matching Pair - 40cm long](https://www.adafruit.com/product/4722)
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 nice and long, 40cm in fact. They've got both small form factor and are a matching...

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

### JST PH 2mm 3-Pin Socket to Color Coded Cable - 200mm

[JST PH 2mm 3-Pin Socket to Color Coded Cable - 200mm](https://www.adafruit.com/product/4046)
This cable will let you turn a JST PH 3-pin cable _socket_ into 3 individual tinned wires. These are great to match up with our JST 3-PH cables, for extending and connecting sensors or LEDs, and the wires are even color coded!

[We...](https://www.adafruit.com/product/3893)

In Stock
[Buy Now](https://www.adafruit.com/product/4046)
[Related Guides to the Product](https://learn.adafruit.com/products/4046/guides)
![Angled shot of JST PH 3-Pin Socket to Color Coded Cable - 200mm](https://cdn-shop.adafruit.com/640x480/4046-02.jpg)

### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
![Angled shot of STEMMA JST PH 3-Pin to Male Header Cable - 200mm.](https://cdn-shop.adafruit.com/640x480/3893-03.jpg)

### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

## Non-Adafruit Parts

- Polycarbonate Tubes – 1" OD
  - [Ultrasaber Blades](https://ultrasabers.com/product-category/parts/blades/)
  - [24" Ultra Edge Heavy Grade](https://ultrasabers.com/product/24-ultraedge-heavy-grade-initiate-blade/)
  - [The Custom Saber Shop blades](https://www.thecustomsabershop.com/1-OD-Thick-Walled-C91.aspx)
  - [40" PolyC TransWhite (thick walled)](https://www.thecustomsabershop.com/1-Thick-walled-Trans-White-PolyC-40-long-P528.aspx)

- Coroplast / Plastic Corrugated Sheet – 20in x 30in – 4mm
- [Nitto Double-sided Tape](https://www.amazon.com/gp/product/B000QKL08K/)
- Clear Scotch Tape

# Lightsaber Prop-Maker 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/123/165/medium800/3d_printing_circuit-diagram-v3.jpg?1690808435)

## Wired Connections

- The NeoPixel strip, button switch, 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.
- A 2200mAh battery is connected to the battery port on the Feather.
- The RGB LED in the button switch has the following connections:
  - **R pin** to **D10** on Feather
  - **G** pin to **D11** on Feather
  - **B** pin to **D12** on Feather
  - **+** pin to **3V** on Feather

&nbsp;

# Lightsaber Prop-Maker RP2040

## CAD Files

## 3D Printed Parts

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material using PLA filament. Original design source may be downloaded using the links below.

![3d_printing_3d-parts-FDM.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/159/medium640/3d_printing_3d-parts-FDM.jpg?1690807371)

## Parts List

A list of the parts need to build the lightsaber.

- 1x Battery Holder
- 1x Blade Holder
- 1x Emitter
- 6x Grip
- 1x Hilt
- 1x PCB Holder
- 1x Pommel

Optional Parts

- 6x Grip
- 1x Blade Tip

![3d_printing_cad-parts-white.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/160/medium640/3d_printing_cad-parts-white.jpg?1690807782)

[Download CAD source](https://cdn-learn.adafruit.com/assets/assets/000/123/161/original/CAD.zip?1690807943)
[STLs.zip](https://cdn-learn.adafruit.com/assets/assets/000/123/180/original/STLs.zip?1690893910)
## 3D Printing Service

These parts were made using [JLCPCB's 3D printing service.](https://3d.jlcpcb.com/3d-printing-quote?from=homepage)&nbsp;

Use the following options for matte black resin parts.

- 3D Technology: SLA(resin)
- Material: Black Resin
- Color: Grayish BLack
- Sanding: Yes

![3d_printing_3d-resin-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/192/medium640/3d_printing_3d-resin-parts.jpg?1690910425)

## Resin Parts

The blade holder should be printed in translucent resin. Use the following options for the blade holder.

- 3D Technology: SLA(resin)
- Material: 8001 (Translucent)
- Color: Translucent

![3d_printing_JLCPCB-translucent-resin.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/195/medium640/3d_printing_JLCPCB-translucent-resin.jpg?1690910828)

## Build Volume

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

- 80mm (X) x 80mm (Y) x 190mm (Z)

![3d_printing_cura-slicer.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/163/medium640/3d_printing_cura-slicer.jpg?1690808204)

## Part Remixes

Having issues with the blade emitter or other parts not quiet fitting? Check out the remixes on [Printables.com](https://www.printables.com/model/542429-lightsaber-rp2040/remixes) for solutions from the community.

&nbsp;

![3d_printing_lightsaber-part-remixes.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/736/medium640/3d_printing_lightsaber-part-remixes.jpg?1714500728)

[Community Part Remixes](https://www.printables.com/model/542429-lightsaber-rp2040/remixes)
## Design Source Files

The project assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, STL and more. Electronic components like Adafruit's boards, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts/).

![3d_printing_5768-Feather-RP2040-PropMaker.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/164/medium640/3d_printing_5768-Feather-RP2040-PropMaker.jpg?1690808299)

# Lightsaber Prop-Maker 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/145/511/original/nuke_universal.uf2?1786537992)
# Lightsaber Prop-Maker RP2040

## Code the Lightsaber

Once you've finished setting up your RP2040 Prop-Maker Feather with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **Download Project Bundle** button in the window below. It will download to your computer as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Feather_RP2040_Prop-Maker_Lightsaber/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.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/Feather_RP2040_Prop-Maker_Lightsaber.png )

## How the CircuitPython Code Works

At the top of the code, you can customize a few attributes for your lightsaber. `HIT_THRESHOLD` and `SWING_THRESHOLD` affect the force needed to trigger a hit or swing for the lightsaber. The `COLORS` array has all of the available colors for the NeoPixels. You can change the value of `SABER_COLOR` to match the index for the color that you want your lightsaber to be. `CLASH_COLOR` is the color that the lightsaber turns when a hit is detected.

```python
# CUSTOMIZE SENSITIVITY HERE: smaller numbers = more sensitive to motion
HIT_THRESHOLD = 120
SWING_THRESHOLD = 130
RED = (255, 0, 0)
YELLOW = (125, 255, 0)
GREEN = (0, 255, 0)
CYAN = (0, 125, 255)
BLUE = (0, 0, 255)
PURPLE = (125, 0, 255)
WHITE = (255, 255, 255)
COLORS = [RED, YELLOW, GREEN, CYAN, BLUE, PURPLE, WHITE]
SABER_COLOR = 3
CLASH_COLOR = 6
```

## Sound FX

Audio is played back through the onboard I2S amp on the Feather. The `play_wav()` function opens a WAV file from the **sounds** folder and then plays it.

```python
wavs = []
for filename in os.listdir('/sounds'):
    if filename.lower().endswith('.wav') and not filename.startswith('.'):
        wavs.append("/sounds/"+filename)
wavs.sort()
print(wavs)
print(len(wavs))

audio = audiobusio.I2SOut(board.I2S_BIT_CLOCK, board.I2S_WORD_SELECT, board.I2S_DATA)

def play_wav(num, 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).
    """
    try:
        n = wavs[num]
        wave_file = open(n, "rb")
        wave = audiocore.WaveFile(wave_file)
        audio.play(wave, loop=loop)
    except:  # pylint: disable=bare-except
        return
```

## Button, NeoPixels, and Accelerometer

The button and NeoPixels are connected to the external pins in the terminal block. The button uses the **Debounce** library so that long press and short press can be monitored in the loop. The onboard LIS3DH accelerometer is used to read movement and tap detection for the swing and hit functionality.

```python
# external button
pin = DigitalInOut(board.EXTERNAL_BUTTON)
pin.direction = Direction.INPUT
pin.pull = Pull.UP
switch = Button(pin, long_duration_ms = 1000)
switch_state = False

# external neopixels
num_pixels = 100
pixels = neopixel.NeoPixel(board.EXTERNAL_NEOPIXELS, num_pixels, auto_write=True)
pixels.brightness = 0.8

# onboard LIS3DH
i2c = board.I2C()
int1 = DigitalInOut(board.ACCELEROMETER_INTERRUPT)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, int1=int1)
lis3dh.range = adafruit_lis3dh.RANGE_2_G
lis3dh.set_tap(1, HIT_THRESHOLD)
```

## RGB LED

Inside the button is an RGB LED. The color of the LED matches the color of the NeoPixels with the help of the `set_rgb_led()` function.

```python
red_led = pwmio.PWMOut(board.D10)
green_led = pwmio.PWMOut(board.D11)
blue_led = pwmio.PWMOut(board.D12)

def set_rgb_led(color):
    # convert from 0-255 (neopixel range) to 65535-0 (pwm range)
    red_led.duty_cycle = int(simpleio.map_range(color[0], 0, 255, 65535, 0))
    green_led.duty_cycle = int(simpleio.map_range(color[1], 0, 255, 65535, 0))
    blue_led.duty_cycle = int(simpleio.map_range(color[2], 0, 255, 65535, 0))

set_rgb_led(COLORS[SABER_COLOR])
```

## The Loop

At the top of the loop, the button is monitored for any change in state with `switch.update()`. The rest of the loop is a series of states defined by the value of `mode`. When `mode` is `0`, the lightsaber boots up by playing the start-up sound and having the NeoPixels light-up one by one.

```python
switch.update()
# startup
if mode == 0:
  print(mode)
  play_wav(0, loop=False)
  for i in range(num_pixels):
    pixels[i] = COLORS[SABER_COLOR]
    pixels.show()
    time.sleep(1)
    play_wav(1, loop=True)
    mode = 1
```

## Default Mode

When `mode` is `1`, the lightsaber is idle, playing the idling sound on a loop. The LIS3DH is monitored for any changes that match or exceed the thresholds defined at the top of the code for a hit or swing.

```python
# default
elif mode == 1:
  x, y, z = lis3dh.acceleration
  accel_total = x * x + z * z
  if lis3dh.tapped:
      print("tapped")
      mode = "hit"
  elif accel_total >= SWING_THRESHOLD:
      print("swing")
      mode = "swing"
```

The button is also monitored for a short press or long press. When a short press is detected, the lightsaber goes into `mode 3`, which is the shutdown mode. When a long press is detected, the lightsaber goes into `mode 5`, which lets you change the color of the lightsaber.

```python
if switch.short_count == 1:
    mode = 3
if switch.long_press:
    audio.stop()
    play_wav(19, loop=True)
    print("change color")
    mode = 5
```

## Lightsaber Battle

If a swing or hit is detected, a randomized matching sound effect is played. In the case of a hit, the NeoPixels change in color to white. After the swing or hit has finished, the idle sound begins playing again on a loop.

```python
# clash or move
    elif mode == "hit":
        audio.stop()
        play_wav(random.randint(3, 10), loop=False)
        while audio.playing:
            pixels.fill(WHITE)
            pixels.show()
        pixels.fill(COLORS[SABER_COLOR])
        pixels.show()
        play_wav(1, loop=True)
        mode = 1
    elif mode == "swing":
        audio.stop()
        play_wav(random.randint(11, 18), loop=False)
        while audio.playing:
            pixels.fill(COLORS[SABER_COLOR])
            pixels.show()
        pixels.fill(COLORS[SABER_COLOR])
        pixels.show()
        play_wav(1, loop=True)
        mode = 1
```

## Power Down

If a short press is detected in idle mode, the lightsaber powers down by playing the shutdown sound and turning off the NeoPixels one by one. The external power pin is also turned off to conserve battery power.

If a short press is detected in this mode, `mode` is set to `4` and the external power pin is turned back on. Then, `mode` is set to `0` to return to the start-up mode.

```python
# turn off
    elif mode == 3:
        audio.stop()
        play_wav(2, loop=False)
        for i in range(99, 0, -1):
            pixels[i] = (0, 0, 0)
            pixels.show()
        time.sleep(1)
        external_power.value = False
        mode = 4
    # go to startup from off
    elif mode == 4:
        if switch.short_count == 1:
            external_power.value = True
            mode = 0
```

## Choose Your Color

A long press in idle mode changes the `mode` to `5`, which lets you change the color of the NeoPixels. With every short press, the selected index in the `COLORS` array advances by `1`. The RGB LED also changes its color to match. You'll use a long press to exit color change mode with your new color and return to idle mode.

```python
# change color
    elif mode == 5:
        if switch.short_count == 1:
            SABER_COLOR = (SABER_COLOR + 1) % 6
            pixels.fill(COLORS[SABER_COLOR])
            pixels.show()
            set_rgb_led(COLORS[SABER_COLOR])
        if switch.long_press:
            play_wav(1, loop=True)
            pixels.fill(COLORS[SABER_COLOR])
            pixels.show()
            set_rgb_led(COLORS[SABER_COLOR])
            mode = 1
```

# Lightsaber Prop-Maker RP2040

## Wiring

## Button Wires

Use the 4-pin cable for the RGB LED inside the button.

Create a 2-wire cable using the silicone ribbon cable. Measure and cut to create a wire that is 23cm in length.&nbsp;

![3d_printing_button-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/056/medium640/3d_printing_button-wires.jpg?1690461751)

## Wiring Button Switch

Solder the 2-wire cable to the two unlabeled pins on the button switch.

![3d_printing_button-switch-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/057/medium640/3d_printing_button-switch-wiring.jpg?1690461778)

## Wiring RGB LED

Solder the 4-pin cable to the labeled pins on the button. Follow the RGB LED wiring:

- Red Wire - R Pin (Red LED)
- White Wire - G Pin (Green LED)
- Black Wire - B Pin (Blue LED)
- Yellow Wire - C+ Pin (Voltage)

![3d_printing_button-led-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/058/medium640/3d_printing_button-led-wiring.jpg?1690461793)

## Wired Button

Double check the wires have been properly soldered to the pins on the button.

![3d_printing_button-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/059/medium640/3d_printing_button-wired.jpg?1690461834)

## Slide Switch Wire

Use the silicone ribbon cable to create a 2-pin cable. Measure and cut the wire to be 7.5cm in length.

![3d_printing_slide-switch-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/060/medium640/3d_printing_slide-switch-wires.jpg?1690461853)

## Wiring Slide Switch

Cut one of the three pins on the slide switch, either the far left or right but not the middle. The, cut the two remaining pins half their length.

Solder the 2-pin cable to the pins on the slide switch.

![3d_printing_slide-switch-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/061/medium640/3d_printing_slide-switch-wiring.jpg?1690461885)

## Wired Slide Switch

Double check the wires have been properly soldered to the pins on the slide switch.

![3d_printing_slide-switch-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/062/medium640/3d_printing_slide-switch-wired.jpg?1690461897)

## Speaker Wires

Cut the cable from the speaker so the wires are 8cm in length.

Remove a bit of insulation from the two wires and tin them using a bit of solder.

Optionally save the 2-pin connector for another project.

![3d_printing_speaker-wire-setup.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/063/medium640/3d_printing_speaker-wire-setup.jpg?1690461916)

## Install Speaker

Peel away the protective backing from the speaker.

Attach the speaker to the bottom of the PCB holder.

Reference the photo for the correct orientation.

![3d_printing_speaker-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/064/medium640/3d_printing_speaker-holder-install.jpg?1690461936)

## Connect Slide Switch

Get the slide switch ready to connect to the Feather.

![3d_printing_feather-switch.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/065/medium640/3d_printing_feather-switch.jpg?1690461984)

## Connected Slide Switch

The two wires are soldered to the pins on the bottom of the Feather.

Solder one wire to the ground pin (G) and the other to the enable pin (EN). It doesn't matter which wire goes to which pin.

![3d_printing_feather-switch-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/066/medium640/3d_printing_feather-switch-wiring.jpg?1690462009)

![3d_printing_feather-switch-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/067/medium640/3d_printing_feather-switch-wired.jpg?1690462016)

## Connect RGB Cable

Get the 4-pin cable ready to solder to the Feather.

![3d_printing_feather-cable.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/068/medium640/3d_printing_feather-cable.jpg?1690462036)

## Solder RGB Cable

The 4-pin cable is soldered to the pins on the bottom of the Feather.

Cut the wires from the cable so they're 10cm in length.

Make the following connections:

- Red Wire – Pin #10
- White Wire – Pin #11
- Black Wire – Pin #12
- Yellow Wire – Pin 3V

![3d_printing_feather-cable-wiring.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/069/medium640/3d_printing_feather-cable-wiring.jpg?1690462058)

![3d_printing_feather-cable-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/070/medium640/3d_printing_feather-cable-wired.jpg?1690462078)

# Lightsaber Prop-Maker RP2040

## Blade Assembly

## Blade Tips

The polycarbonate tubes may need a separate piece for the tip. Each blade can have a different tip depending on the supplier.&nbsp;

Polycarbonate tubes from [Ultrasaber](https://ultrasabers.com/product-category/blades/) have blade tip options that come preinstalled.

Optionally 3D print your own tip with a translucent filament or resin using the provided files in the CAD files page.

![3d_printing_blade-tips.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/178/medium640/3d_printing_blade-tips.jpg?1690893362)

![3d_printing_blade-tips-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/179/medium640/3d_printing_blade-tips-installed.jpg?1690893551)

## Blade Parts

Get the reel of NeoPixels, corrugated poster board and polycarbonate tube ready.

![3d_printing_blade-parts-B.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/118/medium640/3d_printing_blade-parts-B.jpg?1690555907)

## Polycarbonate Tube

Check the polycarbonate tube has the inner lining and is ready for use.

![3d_printing_blade-tube-inner.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/115/medium640/3d_printing_blade-tube-inner.jpg?1690555684)

## Corrugated Plastic Setup

Measure and cut two strips of corrugated plastic so they're the length matches the polycarbonate tube and the width matches the NeoPixel strip.

If it's too short, extend the length with additional strips and attach using scotch tape.

![3d_printing_coroplast-sticks.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/119/medium640/3d_printing_coroplast-sticks.jpg?1690557069)

## NeoPixel Strip Setup

Remove the NeoPixel strip from the packaging and unspool it from the reel.

Use a hobby knife to remove the hot glue from the ends of the NeoPixel Strip.

Use a soldering iron to desolder the stock cable from the NeoPixel strip.

![3d_printing_strip-remove.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/120/medium640/3d_printing_strip-remove.jpg?1690556264)

![3d_printing_strip-remove-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/121/medium640/3d_printing_strip-remove-wires.jpg?1690557849)

Warning: 

## Remove Sheathing&nbsp;

Carefully remove the sheathing from the NeoPixel Strip.

![3d_printing_strip-remove-sheathing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/122/medium640/3d_printing_strip-remove-sheathing.jpg?1690558904)

## JST Cable

Get the 3-pin JST cable ready to solder to the NeoPixel strip.

Cut and strip the ends of the wires using wire strippers. Tin the ends using a bit of solder to prevent the strands of wire from fraying.

![3d_printing_strip-3pin.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/123/medium640/3d_printing_strip-3pin.jpg?1690558973)

## Solder JST Cable

Attach the wires to the pads on the end of the NeoPixel strip with the Data In pads.

Solder the red wire to (+), white wire to (D) and black wire to (–).

![3d_printing_strip-3pin-solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/124/medium640/3d_printing_strip-3pin-solder.jpg?1690557131)

## NeoPixel Cable

Double check the wires have been properly soldered to the correct end of the NeoPixel strip.

![3d_printing_strip-3pin-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/125/medium640/3d_printing_strip-3pin-wired.jpg?1690559119)

## Cut NeoPixel Strip

Measure the NeoPixel strip so it matches the length of the polycarbonate tube.

Cut the strip using snips across the solder pads.

The strip should have 85 NeoPixel LEDs.

![3d_printing_strip-cut.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/126/medium640/3d_printing_strip-cut.jpg?1690559370)

## Setup NeoPixel Strip

The NeoPixel strip will be sandwiched in between the two strips of corrugated plastic.

![3d_printing_strip-sticks.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/127/medium640/3d_printing_strip-sticks.jpg?1690559526)

## Attaching NeoPixel Strip

Use double-sided tape to attach the NeoPixel strip to one of the strips of corrugated plastic.

![3d_printing_strip-nitto.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/128/medium640/3d_printing_strip-nitto.jpg?1690559613)

![3d_printing_strip-nitto-taped.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/129/medium640/3d_printing_strip-nitto-taped.jpg?1690559644)

## Secured NeoPixel Strip

Place the other strip of corrugated plastic over the NeoPixel strip.

Wrap strips of scotch tape over the two strips of corrugated plastic to secure the pieces together.

![3d_printing_strip-stick-duo.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/130/medium640/3d_printing_strip-stick-duo.jpg?1690559760)

![3d_printing_strip-duo-tapped.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/131/medium640/3d_printing_strip-duo-tapped.jpg?1690560095)

## Install NeoPixel

Carefully slide the assembled NeoPixel strip into the polycarbonate tube.&nbsp;

![3d_printing_strip-tube-end.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/132/medium640/3d_printing_strip-tube-end.jpg?1690558953)

# Lightsaber Prop-Maker RP2040

## Assembly

## Battery Holder

Get the 2200mah battery and 3D printed battery holder ready.&nbsp;

Slide the battery into the holder so it's fitted about half the length of the battery.

![3d_printing_battery-holder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/071/medium640/3d_printing_battery-holder.jpg?1690462128)

![3d_printing_battery-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/072/medium640/3d_printing_battery-holder-install.jpg?1690462150)

## Battery Holder

Connect the battery to the Feather.&nbsp;

If the Feather powers on, use the slide switch to turn it off.

![3d_printing_battery-feather-plug.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/073/medium640/3d_printing_battery-feather-plug.jpg?1690462167)

## Feather Holder

Get the PCB holder ready for installation.

Orient the PCB holder so the end with the flange is aligned with the Feathers USB-C connector.

## Speaker Mount

The speaker features a sticker around the speaker frame. Peel the sticker cover off and adhere to the bottom of the Feather holder.

![3d_printing_feather-holder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/074/medium640/3d_printing_feather-holder.jpg?1690462199)

## Install Slide Switch

Press fit the slide switch in between the two standoffs.

![3d_printing_switch-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/075/medium640/3d_printing_switch-holder-install.jpg?1690462218)

## Cable Setup

Flip the Feather so the bottom side faces up and group the various cables.

![3d_printing_feather-holder-wire-setup.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/076/medium640/3d_printing_feather-holder-wire-setup.jpg?1690462240)

## Install Feather

Place the Feather into the PCB holder so the PCB is fitted underneath one of the clips. The standoff pegs should fit into the mounting holes.

Then, slightly flex the PCB holder open to fit the other side of the Feather.

![3d_printing_feather-holder-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/077/medium640/3d_printing_feather-holder-installing.jpg?1690462268)

![3d_printing_feather-holder-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/078/medium640/3d_printing_feather-holder-installed.jpg?1690462278)

## Feather Wires

Ensure the various cables are all facing out towards the Feathers screw terminals.

All of the wires should positioned in between the standoffs.&nbsp;

![3d_printing_feather-holder-cables.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/079/medium640/3d_printing_feather-holder-cables.jpg?1690462299)

## Connect Speaker

Place the two wires from the speaker into the Feathers screw terminals.

Use a small flat head screwdriver to secure the wires to the terminals.

![3d_printing_feather-speaker-wire-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/080/medium640/3d_printing_feather-speaker-wire-install.jpg?1690462315)

## Blade Holder

Get the 3D printed blade holder ready to install onto the polycarbonate tube.

![3d_printing_blade-holder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/086/medium640/3d_printing_blade-holder.jpg?1690464753)

## Install Blade Holder

Insert the 3-pin connector from the NeoPixel strip through the hole of the 3d printed blade holder.

Firmly press the holder onto the polycarbonate tube.

It should have a very snug fit. Ensure the wires are not being kinked.

![3d_printing_blade-holder-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/087/medium640/3d_printing_blade-holder-installing.jpg?1690464771)

![3d_printing_blade-holder-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/088/medium640/3d_printing_blade-holder-installed.jpg?1690464784)

## NeoPixel Cable Extension

Connect the 3-pin JST cable to the matching extension cable.

![3d_printing_blade-jst-plug.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/092/medium640/3d_printing_blade-jst-plug.jpg?1690464847)

## Install Button

Get the button and hilt ready for installation.

Insert included the rubber ring onto the threading of the button.

Insert the two cables from the button through the hole on the side of the hilt.

Do not fully install the button into the hilt just yet.

![3d_printing_hilt-button.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/090/medium640/3d_printing_hilt-button.jpg?1690464812)

![3d_printing_hilt-button-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/091/medium640/3d_printing_hilt-button-install.jpg?1690464831)

## Hilt Wires

Insert the 3-pin JST extension cable from the NeoPixel strip through the top of the hilt.

Pull the wires from the button and NeoPixel strip so they're coming out of the bottom of the hilt.

Get the Feather ready to secure the various wires to the screw terminals.

![3d_printing_blade-cable-hilt-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/093/medium640/3d_printing_blade-cable-hilt-install.jpg?1690464866)

## Connect RGB LED

Connect the 4-pin cable from the Feather to the 4-pin cable on the button.&nbsp;

![3d_printing_rgbled-cable-plug.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/094/medium640/3d_printing_rgbled-cable-plug.jpg?1690464894)

## Connect Wires

Insert the wires from the button switch and NeoPixel strip to the corresponding pins on the screw terminals.

Use a screwdriver to tighten the screws and secure the wires in place.

![3d_printing_feather-cables-secure.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/095/medium640/3d_printing_feather-cables-secure.jpg?1690464912)

## Install Battery Holder

Bundle up the various wires inside the hilt to one side.

Then, carefully insert the battery holder into the hilt with space for the wires to pass through.

Push the battery holder into the hilt while keeping the wires inside the hilt taut.&nbsp;

![3d_printing_hilt-bat-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/096/medium640/3d_printing_hilt-bat-holder-install.jpg?1690464933)

## Install PCB Holder

With the battery holder fully inserted into the hilt, begin fitting the PCB holder into the hilt.

![3d_printing_hilt-pcb-holder-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/097/medium640/3d_printing_hilt-pcb-holder-install.jpg?1690464952)

## Installed PCB Holder

Push the PCB holder into the hilt until the flange is pressed up against the bottom surface of the hilt.

&nbsp;

![3d_printing_hilt-pcb-holder-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/098/medium640/3d_printing_hilt-pcb-holder-secured.jpg?1690464971)

## Secure Button

Adjust the various wires inside the hilt and begin to insert the body of the button into the hole.

Firmly press the button into the hole until it's flush with the hilt.

Ensure the various wires in the hilt are not being kinked.

![3d_printing_hilt-button-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/099/medium640/3d_printing_hilt-button-installing.jpg?1690464996)

![3d_printing_hilt-button-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/101/medium640/3d_printing_hilt-button-installed.jpg?1690465010)

## Test Circuit

Use the slide switch to test the circuit. The Feather should power on. The NeoPixels and RGB LED should light up. Audio should also play from the speaker.

![3d_printing_blade-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/102/medium640/3d_printing_blade-test.jpg?1690465023)

![3d_printing_blade-pink-test.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/103/medium640/3d_printing_blade-pink-test.jpg?1690465035)

## Install Blade Emitter

Position the polycarbonate tube so it's aligned with the top of the hilt.

Fit the blade emitter part over the tip of the polycarbonate tube. Slide it all the way down the tube.

Twist the emitter to screw it onto the threading of the hilt.

Fasten the emitter onto the hilt until they're both tight.&nbsp;

&nbsp;

![3d_printing_emitter-blade-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/104/medium640/3d_printing_emitter-blade-installing.jpg?1690465048)

![3d_printing_emitter-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/105/medium640/3d_printing_emitter-secured.jpg?1690465068)

## Turn On and Off

Use the slide switch to power the Feather on and off. Leave it on when ready for use.&nbsp;

![3d_printing_slide-switch-power.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/108/medium640/3d_printing_slide-switch-power.jpg?1690465108)

## Install Pommel

Get the pommel and begin fastening onto the bottom of the hilt.

![3d_printing_pommel-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/106/medium640/3d_printing_pommel-installing.jpg?1690465084)

![3d_printing_pommel-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/107/medium640/3d_printing_pommel-secured.jpg?1690465093)

## Final Build

Congratulations on building your Lightsaber!

Use the hilt's button to switch between the on and off modes.

Press and hold the button for 2 seconds to go into color changing mode.

Press and hold for another 2 seconds to exit the color changing mode.

![3d_printing_final-build.jpg](https://cdn-learn.adafruit.com/assets/assets/000/123/109/medium640/3d_printing_final-build.jpg?1690465125)


## Guide 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)
### Rugged Metal Pushbutton - 16mm 6V RGB Momentary

[Rugged Metal Pushbutton - 16mm 6V RGB Momentary](https://www.adafruit.com/product/3350)
By popular demand, we now have these buttons with a full color RGB LED ring light! These chrome-plated metal buttons are rugged, but certainly&nbsp;not lacking in flair. Simply drill a 16mm hole into any material up to 1/4" thick and you can fit these in place – there's even a...

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

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

These NeoPixel strips have 144 digitally-addressable pixel Mini LEDs per meter and are very affordable and are only 7.5 mm wide (0.3")&nbsp;if you remove the strip from the...

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

[Mini Oval Speaker - 8 Ohm 1 Watt](https://www.adafruit.com/product/3923)
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...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3923)
[Related Guides to the Product](https://learn.adafruit.com/products/3923/guides)
### Lithium Ion Cylindrical Battery - 3.7v 2200mAh

[Lithium Ion Cylindrical Battery - 3.7v 2200mAh](https://www.adafruit.com/product/1781)
Need a big battery for your project? This lithium-ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage, and over-current protection. Yet, it is slim and easy to fit into many project cases.  
  
This cell can provide 2 **C** of...

In Stock
[Buy Now](https://www.adafruit.com/product/1781)
[Related Guides to the Product](https://learn.adafruit.com/products/1781/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)
### 1.25mm Pitch 4-pin Cable Matching Pair - 40cm long

[1.25mm Pitch 4-pin Cable Matching Pair - 40cm long](https://www.adafruit.com/product/4722)
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 nice and long, 40cm in fact. They've got both small form factor and are a matching...

In Stock
[Buy Now](https://www.adafruit.com/product/4722)
[Related Guides to the Product](https://learn.adafruit.com/products/4722/guides)
### JST PH 2mm 3-Pin Socket to Color Coded Cable - 200mm

[JST PH 2mm 3-Pin Socket to Color Coded Cable - 200mm](https://www.adafruit.com/product/4046)
This cable will let you turn a JST PH 3-pin cable _socket_ into 3 individual tinned wires. These are great to match up with our JST 3-PH cables, for extending and connecting sensors or LEDs, and the wires are even color coded!

[We...](https://www.adafruit.com/product/3893)

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

## Related Guides

- [Adafruit NeoPixel Überguide](https://learn.adafruit.com/adafruit-neopixel-uberguide.md)
- [Adafruit RP2040 Prop-Maker Feather](https://learn.adafruit.com/adafruit-rp2040-prop-maker-feather.md)
- [Circuit Playground Express Compass](https://learn.adafruit.com/circuit-playground-express-compass.md)
- [Make a Zelda Master Sword with the RP2040 Prop-Maker Feather](https://learn.adafruit.com/master-sword-rp2040.md)
- [MIT Green Building NeoPixel Tetris](https://learn.adafruit.com/tetris-building.md)
- [Digital Inputs with Adafruit IO WipperSnapper](https://learn.adafruit.com/digital-inputs-with-adafruit-io-wippersnapper.md)
- [DotStar Fortune Necklace with Bluetooth and Touch](https://learn.adafruit.com/dotstar-fortune-necklace.md)
- [MUNNY Glowing Friend with Bluetooth Control!](https://learn.adafruit.com/munny-lamp.md)
- [16x16 NeoPixel Matrix Square Pixel Display](https://learn.adafruit.com/16x16-neopixel-matrix-square-pixel-display.md)
- [No-Code WipperSnapper Summoning Horn](https://learn.adafruit.com/adafruit-io-wippersnapper-summoning-horn.md)
- [BLE Synth with the Feather nRF52840 and Circuit Playground Bluefruit](https://learn.adafruit.com/ble-synth-with-the-feather-nrf52840-and-circuit-playground-bluefruit.md)
- [A NeoPixel Pomodoro Timer](https://learn.adafruit.com/a-neopixel-pomodoro-timer.md)
- [3D Printed Truck Risers with NeoPixel LEDs](https://learn.adafruit.com/3d-printed-truck-risers-with-neopixel-leds.md)
- [NeoPixel Bracelet](https://learn.adafruit.com/neopixel-bracelet.md)
- [CircuitPython Text Editor On The Go](https://learn.adafruit.com/circuitpython-text-editor-on-the-go.md)
- [Cartoon Character Clock](https://learn.adafruit.com/cartoon-character-clock.md)
- [Zelda: Breath of the Wild – 3D Printed Bladesaw](https://learn.adafruit.com/bladesaw.md)
