# Magic Mirror with Glowing Secret Messages

## Overview

https://youtu.be/x1vFNoHPIho

> Mirror, Mirror, on the Wall  
> Who is the fairest one of all?
> 
> -The Wicked Queen, Snow White

Build a magic mirror that inspires you to be your best self every morning.

A mirror hangs quietly on your wall. You walk up to check your image, and a special message appears in the glass just for you. Once you've read the message, it slowly fades away, leaving a clear, ordinary mirror. Did that really happen?

This project uses a Sparkle Motion ESP32 board, NeoPixels LED lights, and a motion (passive infrared or PIR) sensor to make glowing messages appear inside a mirror. The magical effect is done using 2-way mirror glass (or acrylic) covering a piece of edge-lit acrylic that has been etched with quotes, icons, math equations, and anything else you want to be inspired by when you look at your reflection. When the PIR sensor is triggered by someone walking up to the mirror, a random quote (or mustache) will appear for a moment before fading away.&nbsp;

This is an intermediate level project that gets pretty deep into the features of software called WLED. We'll learn to set up the PIR sensor and delve into using segments to turn on just a small portion of our LED strip at a time. We'll also learn to randomize the WLED playlist when it's triggered by the sensor, so a different quote appears each time.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/948/medium800/led_strips_hello_gorgeous_hero.jpg?1758746833)

## Parts
### Adafruit Sparkle Motion - All-In-One WLED and xLights Board

[Adafruit Sparkle Motion - All-In-One WLED and xLights Board](https://www.adafruit.com/product/6100)
The&nbsp; **Adafruit Sparkle Motion&nbsp;** is the flagship in&nbsp;our&nbsp;series of "Sparkle Motion" boards, that are our attempt to make the&nbsp;best small&nbsp;WLED-friendly smart LED driving board in the whole world. Our resident mermaid,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6100)
[Related Guides to the Product](https://learn.adafruit.com/products/6100/guides)
![Angled shot of rectangular LED driver PCB with green terminal blocks.](https://cdn-shop.adafruit.com/640x480/6100-07.jpg)

### Ultra Skinny NeoPixel 1515 LED Strip 4mm wide

[Ultra Skinny NeoPixel 1515 LED Strip 4mm wide](https://www.adafruit.com/product/4368)
We have all&nbsp;sorts of LED strips for a wide range of needs. [_Chonky_](https://www.adafruit.com/product/3869) strips? We got those! [Strips with alligator clips](https://www.adafruit.com/?q=neopixel%20alligator%20clips%20stripping%20wires) that are easy-peasy...

In Stock
[Buy Now](https://www.adafruit.com/product/4368)
[Related Guides to the Product](https://learn.adafruit.com/products/4368/guides)
![Curved NeoPixel LED strip wired to arduino, with each LED changing to a different color in the rainbow](https://cdn-shop.adafruit.com/product-videos/640x480/4368-07.jpg)

### PIR (motion) sensor

[PIR (motion) sensor](https://www.adafruit.com/product/189)
PIR sensors are used to detect motion from pets/humanoids from about 20 feet away (possibly works on zombies, not guaranteed). This one has an adjustable delay before firing (approx 2-4 seconds), adjustable sensitivity **and** we include a 1 foot (30 cm) cable with a socket so you...

In Stock
[Buy Now](https://www.adafruit.com/product/189)
[Related Guides to the Product](https://learn.adafruit.com/products/189/guides)
![PIR (motion) sensor with a cable around it.](https://cdn-shop.adafruit.com/640x480/189-00.jpg)

### Wall Power Supply with USB C - 5V 4A Output and Switch

[Wall Power Supply with USB C - 5V 4A Output and Switch](https://www.adafruit.com/product/5803)
We love the Raspberry Pi 4 and 5, with their fancy new USB Type C power connectors. Now we have an even better power supply that can be used with either a Pi 4 or even a Pi 5 with 5V output and **4 Amps** of current to handle builds with accessories and displays.&nbsp;This flat...

In Stock
[Buy Now](https://www.adafruit.com/product/5803)
[Related Guides to the Product](https://learn.adafruit.com/products/5803/guides)
![5V 4A Switching Power Supply with USB C](https://cdn-shop.adafruit.com/640x480/5803-02.jpg)

### 3-pin JST SM Plug + Receptacle Cable Set

[3-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/1663)
These 3-wire cables are 163mm (6.4") long and come as a set. One cable has a JST SM type connector plug on the end. The other cable has a matching JST SM type receptacle connector. They are good for whenever you have 3 wires you want to be able to plug and unplug. We like the solid and...

In Stock
[Buy Now](https://www.adafruit.com/product/1663)
[Related Guides to the Product](https://learn.adafruit.com/products/1663/guides)
![Angled shot of 2 3-pin JST SM Plug + Receptacle Cable.](https://cdn-shop.adafruit.com/640x480/1663-00.jpg)

## Additional Materials Needed

- 2-way mirror: glass or acrylic
- 1/8" - 1/4" acrylic for laser-etching
- A mirror frame
- PVC tape
- Flat black spray paint

## Tools Needed

- Laser cutter for etching acrylic
- Soldering iron & accessories
- Tiny flat-head screwdriver for the screw terminals on the Sparkle Motion and the PIR sensor
- Drill with a spade bit for the PIR sensor lens (optional)

# Magic Mirror with Glowing Secret Messages

## Design Your Mirror

I started with an ornate antique mirror I found in a junk shop. I opened up the back and removed the existing 1/4" piece of mirror glass. This left just enough room for two 1/8" pieces of acrylic without compromising the integrity of the frame by trying to squeeze in more layers.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/837/medium800/led_strips_mirror.jpg?1758578736)

## 2-Way Mirrors

### How They Work&nbsp;

A 2-way mirror, also (confusingly) called a 1-way mirror, has a semi-transparent reflective film applied that shows viewers on one side their reflection, while viewers on the other side can see through the glass. The transparent / reflective surface changes based on the level of light on each side. We can play with this effect by turning lights on and off behind the mirror to make glowing things "appear".&nbsp;

### Where to Get It&nbsp;

2-way mirror glass or acrylic can be purchased online, or it's also possible to get 2-way film and install it yourself on a piece of glass or acrylic. This gives a pretty good result for the money, but was a bit tricky to get "right". An air bubble or speck of dirt trapped under the film will warp the image, and I found I couldn't get it nearly as clear as a real mirror in terms of reflection. It is definitely a more affordable option, but if you want perfect clarity get yourself a [2-way mirror that was made by the pros](https://www.eplastics.com/1-4-x-48-x-96-Two-Way-Mirror-Sheet?inv=1&customer_id=813-364-8639&gad_source=1&gad_campaignid=20300279936&gclid=Cj0KCQjw58PGBhCkARIsADbDilyjggjCsn-JPEfOViI5umIf-iOoDPaCIP5Mki1jmcM5tDCR1qPNgwUaAjbTEALw_wcB).&nbsp;

I went with 1/8" thick since it's much less expensive and totally workable for this project, even for a full-length mirror. 1/8" acrylic can warp, so if your mirror is frameless, you might want to consider the thicker stuff. Remember you also need to squeeze your edge-lit acrylic in the frame too.

If you want to DIY, there are a lot of options for 1-way or 2-way mirror film online. Look for a source that's a bit wider than your project. Some come with installation tools too, so shop around.

## Edge-Lit Etched Acrylic

### Type

Acrylic sheets can be **cast** or **extruded**. Cast acrylic works better than extruded acrylic for carrying light. There's also a product called ChemCast, which is an acrylic sheet that's designed specifically for edge-lit signs. In my experience, at least for smaller projects, the regular cast acrylic works just as well and is less expensive.&nbsp;

### Thickness

1/4" thick acrylic will carry light a lot better than 1/8". I found that the 1/8" stuff was sufficient for my 22" wide mirror, especially if I lit both edges.

https://www.youtube.com/watch?v=Y-H88IpIGYs

## Layout

The etched acrylic will hide behind the 2-way mirror, inside a frame to block any stray light from "leaking" into the edges. When it's dark all around, the etched acrylic completely disappears.&nbsp;

Each laser-etched message should be on its own line, with at least a couple inches of space between them. The plan is to light up&nbsp; **only** the LEDs aligned with each message so the viewer sees just one message at a time.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/834/medium800/led_strips_infographic.jpg?1758577157)

This was my plan, at least. In prototyping, I discovered that having a curvy frame around my mirror gave me a problem: the lights were placed on a curve, so they didn't shoot "straight" into the words. The lights would illuminate the message, but also bleed into the messages above or below. I fixed this problem by cutting the sections apart on the laser, and sealing the edges with black tape. More about this on the Laser Etched Acrylic page.

To work with the thin 1/8" acrylic sheet, I decided to use [ultra-skinny NeoPixel](https://www.adafruit.com/product/4368)&nbsp;lights. They're about 1/8" wide and 150 pixels per meter, and they fit delightfully well on the edge of my acrylic without adding thickness or extra space inside the frame.

They are WICKED hard to solder or connect end-to-end. I used two strips, one for each side of the mirror, and connected both to my Sparkle Motion using JST connectors soldered to the pre-attached wires. This worked great and saved me from some tricky soldering.

If you need a more custom setup and/or are new to soldering, try the [Mini-skinny NeoPixels](https://www.adafruit.com/product/2970) instead.&nbsp;

## Message Layout

I have 14 separate areas that illuminate on my mirror. I'm counting the math equations at the top as one -- the curves up there along the edge of the mirror made it impossible to light them separately.&nbsp;

This means I had to create 14 different light **segments** in WLED to light each message individually.&nbsp;

This is ambitious, but doable in WLED. With an ESP32, WLED will support up to 32 segments -- so limit your design accordingly.

# Magic Mirror with Glowing Secret Messages

## Wiring Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/139/830/medium800/led_strips_magicmirror_wiring_bb.jpg?1758572066)

My mirror is on the bigger side ( \>22" across) so I added an LED strip on each edge. For a smaller mirror or 1/4" etched acrylic instead of 1/8", one high-density strip along one side is sufficient.

Use the screw terminals for the LED strip (or strips) and for the power and ground wires coming from the PIR sensor. Connect the +5v wires to + and the GND wires to G.&nbsp;

The data IN wire from the NeoPixel strip goes to the numbered GPIO pin (19, 21, or 22) in the screw terminal.

The data wire from the PIR sensor gets soldered to GPIO 18, as shown in the diagram above. Don't use the GPIO pins in the screw terminal for this -- they are output only and won't read input data from a sensor.

# Magic Mirror with Glowing Secret Messages

## WLED Installation

This page will guide you through how to install WLED on the Sparkle Motion.

The Sparkle Motion has a USB to serial chip which may need a driver installed before you can install WLED. Head over to the [How to Install Drivers for WCH USB to Serial Chips](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips)&nbsp;tutorial, and download and install the new driver.

## Install WLED

These next steps require a **_Web Serial_-compatible browser**. As of this writing, that means **Google&nbsp;Chrome** , **Microsoft&nbsp;Edge** or **Opera** &nbsp;“desktop” browsers. Other browsers (Safari, Firefox, Explorer and _anything_ mobile) won’t work.

Visit [https://install.wled.me/](https://install.wled.me/)

Plug your microcontroller into your computer with a known good USB cable. Click "Install" and select the port for your board.

Depending on the USB-to-serial bridge chip on the board, you might see one _or two_ serial ports. On Mac, for instance, there might be both “/dev/cu.usbmodem[number]” _and_ “/dev/cu.wchusbserial[number]”. Use the “ **wchusbserial** ” one.

![adafruit_products_Install_WLED.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/287/medium640/adafruit_products_Install_WLED.jpg?1663802069)

After successful installation, enter your WiFi network name and password when prompted. This must be a **2.4 GHz** WiFi network; ESP32 does not support 5 GHz networks. If it can’t connect, then as a fallback WLED will create its own 2.4 GHz WiFi access point.

![led_strips_Install_WLED.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/601/medium640/led_strips_Install_WLED.jpg?1737574345)

If you don't see the "Connect to Wi-Fi" prompt, you'll need to set up your WiFi network using AP (access point) mode.&nbsp;Open up your WiFi settings and look for a WiFi network called&nbsp;`WLED-AP`. Connect to this network&nbsp;using the default password&nbsp;`wled1234`. The WLED interface will pop up in its own browser.

From here, go into Config/Wifi Settings and enter your WiFi credentials near the top. Give your project a name in the mDNS field a little further down the page. Now you can type in "projectname.local" (where "projectname" is your mDNS name) into any web browser on the same wifi network to access your microcontroller.

You can also scan the QR code below to open access point mode.&nbsp;

For more help and troubleshooting tips visit the [Getting Started page on the WLED knowledge base.](https://kno.wled.ge/basics/getting-started/)

![led_strips_install_no_wifi.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/597/medium640/led_strips_install_no_wifi.jpg?1737574050)

![led_strips_WLED_wifi_settings.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/598/medium640/led_strips_WLED_wifi_settings.jpg?1737574103)

![](https://cdn-learn.adafruit.com/assets/assets/000/134/599/medium800/led_strips_WLED-QR-Connect-WB.png?1737574151)

## Setup & Preferences
### WiFi&nbsp;Setup

Head to the **WiFi Setup** screen under Config and create a good URL so you can control your project from any web-enabled device. Call it something you'll remember, that's easy to type into any web browser on your WiFi network in order to connect to your project.

In Safari or Chrome on your phone or computer, type in this web address to access the WLED interface: [http://projectname.local](http://projectname.local)&nbsp; (where "projectname" is whatever you put into this field).

Check out the Additional Settings page for more info on accessing your project. WLED has an "access point mode" that doesn't require a WiFi network for when you're out on the go. It's also helpful to download one of the WLED apps to help manage and organize your projects.

![adafruit_products_wled_config.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/288/medium640/adafruit_products_wled_config.jpg?1663802411)

![led_strips_adafruit_products_WiFi_Settings_generic.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/679/medium640/led_strips_adafruit_products_WiFi_Settings_generic.jpg?1722624553)

Next, head to the&nbsp; **LED Preferences** &nbsp;tab under the&nbsp; **Config menu**.

Scroll down to&nbsp; **Hardware Setup**. Put your total number of LEDs into the **&nbsp;Length** &nbsp;field, and change **GPIO** to the **GPIO NUMBER** associated with the LED data pin you're connecting to on your Sparkle Motion. The far left screw terminal slot is **19** , the middle is **22** , and the far right is **21**.

If you're connecting more than one strip, click the + button to add the second one. WLED will treat them as one long strip: so in this instance, the first pixel of the second strip will be LED # 201.

Make sure to select the correct&nbsp; **Color Order** &nbsp;for your LEDs as well.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/831/medium640/led_strips_outputs2.jpg?1758574075)

## Use It
![adafruit_products_WLED_interface.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/394/medium800/adafruit_products_WLED_interface.jpg?1667150591)

Now you can use any computer or handheld device to control your LEDs.&nbsp;

Make sure your device is on the same WiFi network as your board. Navigate to your custom URL (projectname.local/ ) in a web browser. You'll see a color picker above a whole bunch of color palette choices.

Choose a color, choose an effect, and watch your lights animate and glow!

Save your favorite combinations as presets, create playlists, control the speed and intensity of the animations, and lots more. This web app is incredibly intuitive and easy to use.

Head over to the WLED wiki at [https://kno.wled.ge/](https://kno.wled.ge/) to delve into all the particulars.

## Troubleshooting

_If your lights didn't come on, here are a few things to try:_

1. Head back to WLED and check your pinout configuration under LED Preferences. Be sure the pin number is the correct GPIO for the attachment point you used.
2. Check your wiring! Be sure you connected to the IN end of the LED strip. These strips can be inconsistent so this is a pretty common problem. Use an [alligator clip](https://www.adafruit.com/product/1008) to try connecting the data wire on the other end (the power and ground wires should work from either end).
3. Try re-uploading the WLED software.&nbsp;
4. If the lights come on but you can't control them: i.e. you type in "projectname.local" into your browser and it won't connect, make sure you're on the correct WiFi network. If you're on a different network than the one you set up the sofware on, you won't see the WLED connection.
5. If your lights came on in blue or green instead of yellow, your color order is wrong. See below to fix.
6. If only half your lights came on, be sure you've got the correct number in the "length" field under LED preferences.
7. If your lights came on in a variety of weird colors and looking like a 1950s diner interior, you may have the wrong LED strip type selected. RGBW strips and RGB strips are not the same, so be sure you've got the correct strip type or you'll get very odd behavior.
8. If your microcontroller hangs or keeps rebooting, or gets really hot, you may have the power and ground lines switched. Unplug right away and check: this is a fast way to brick your controller.

# Magic Mirror with Glowing Secret Messages

## Electronics Assembly

Measure out your LED strips and cut them to length. You only need enough lights to edge-light your messages, not necessarily to cover the whole mirror edge.

Solder the female end of your JST connector to the 3 attached wires. This is the IN end of this strip.&nbsp;

You could skip using the connectors and stick the wires from the LEDs directly into the screw terminal ports, but I definitely recommend using connectors since these LEDs are so delicate, and this project is complicated enough that you may want easy access to the microcontroller for testing.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/851/medium640/led_strips_connector.jpeg?1758651753)

Plug your male JST connectors into the female connectors to confirm which wire is which. Some connectors are color coded differently than others, so it's good practice to always plug them in to check the correct orientation before you do your wiring.&nbsp;

Once you've confirmed which wire is + and which is G (the center wire is nearly always the data wire), connect the wires to the screw terminal at ports **21** and **22**.

Connect the included data cable to the PIR sensor, matching up the red wire with +5v. Use the remaining screw terminal connections for the red and black wires, and solder the yellow wire to pin **18** as shown.

The screw terminal GPIO ports are output-only, so if you connect the PIR sensor there it won't work.

![](https://cdn-learn.adafruit.com/assets/assets/000/140/073/medium640/proximity_wired2.jpg?1759258303)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/843/medium800/led_strips_test.jpeg?1758581278)

Plug in your Sparkle Motion board. A test / rainbow sequence will appear on your light strands if you've got everything wired up correctly.&nbsp;

## Troubleshooting

If your light strands don't come on, here are a few things to try:

1. Check to be sure your connectors aren't cross-wired due to mismatched color coding.
2. Be sure you've soldered to the **IN** end of the strip. Look for the tiny arrow: this is the direction of data flow. The strips don't work if you solder to the **OUT** end.
3. If your ultra-skinny strip is coiled up, try straightening it out. These strips are unshielded and can short easily.
4. Check your connectors' connection to the screw terminals. These connectors have skinny wires inside that can break easily, and the connector wires will snap off if they're wiggled around too much.
5. Head to the Install WLED page and work through getting the software installed. If you've installed anything else on the board, it may no longer have the test code loaded.

## PIR Sensor Setup
Look closely at your PIR sensor and find the jumper -- a plastic piece that connects two pins in one corner. Make sure it's in position 2 (as shown) rather than position 1. Position 1 is "single trigger" mode, and position 2 sets it to re-trigger again and again.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/841/medium640/led_strips_pir_jumper.jpg?1758580865)

There are two small orange screws on the side of your sensor. For now, twist them both all the way to the left. One screw determines the amount of time that passes before the sensor resets, and the other controls the distance / sensitivity. Later on you can adjust these slightly to improve your sensor's performance.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/842/medium640/led_strips_pir_screws.jpg?1758581002)

# Magic Mirror with Glowing Secret Messages

## Laser Etched Acrylic

![](https://cdn-learn.adafruit.com/assets/assets/000/139/852/medium800/led_strips_affirmations_mirror2.jpg?1758652131)

For my design, I chose quotes from Tolkien, Rumi, Einstein and Star Wars to adorn my mirror, as well as "Beautiful Mind"-style mathematical equations. I also threw in a curly moustache, just for fun. I'll be looking at this in the morning and I love having affirmations and inspiration to start off my day.

I started by snapping a picture of the original mirror glass to get the correct shape. I used Adobe Illustrator to trace the outline and convert it to a vector file, though you can do this directly in Lightburn laser software as well.

For the text, I found a font I liked and laid everything out all centered and pretty. The first time I took it into Lightburn the font did not come through -- all the text just showed up in Arial and the Makerspace computer didn't have this font (called Luminari).

There is a setting in Illustrator that can fix this: select all the text and choose "Create Outlines" under the Type menu. This will turn your text into vector graphics so you don't need to install any more fonts.

Save/export as an .stl file.

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/853/medium800/led_strips_create_outlines.jpg?1758652496)

Once the design was done, I realized that the laser at my makerspace was not big enough to fit my entire mirror. I ended up using the CNC router to cut the outlines and then had to cut the acrylic in half in order to get the laser etching done. Check your tools' limitations before you embark on this journey!

- [**Engraving:** &nbsp;](https://www.google.com/search?rlz=1C5CHFA_enUS900US900&cs=0&sca_esv=60ddcbf7b678fd31&sxsrf=AE3TifP_0Y2zDCPJ5omj6s7vFVG0st60kw%3A1758652656453&q=Engraving&sa=X&ved=2ahUKEwjk39zWw--PAxVvADQIHSJsIxoQxccNegQIEhAD&mstk=AUtExfBDh8EEcmy67iK5BmYzGs4t9LKVQNM-d2XG7kkZSo_3ClTApS1CItiOO5m1xF2lb8AFziZeXligwEaiV4W2-IPVMrH8Z7fwdN3cqe1C66keOH5gwMa4-4UsiCX6c-hhNpERg7jfFTkxabQzoIGUxCrtR_oH6i0aQ15c4Z3_IrsPItE&csui=3)This is a physical process that removes material to create a permanent marking.&nbsp;In LightBurn, this is achieved with settings that are more forceful, resulting in a deep and physical mark.
- [**Etching:** &nbsp;](https://www.google.com/search?rlz=1C5CHFA_enUS900US900&cs=0&sca_esv=60ddcbf7b678fd31&sxsrf=AE3TifP_0Y2zDCPJ5omj6s7vFVG0st60kw%3A1758652656453&q=Etching&sa=X&ved=2ahUKEwjk39zWw--PAxVvADQIHSJsIxoQxccNegQIGRAD&mstk=AUtExfBDh8EEcmy67iK5BmYzGs4t9LKVQNM-d2XG7kkZSo_3ClTApS1CItiOO5m1xF2lb8AFziZeXligwEaiV4W2-IPVMrH8Z7fwdN3cqe1C66keOH5gwMa4-4UsiCX6c-hhNpERg7jfFTkxabQzoIGUxCrtR_oH6i0aQ15c4Z3_IrsPItE&csui=3)This involves using high heat to discolor or melt the micro-surface, which can create a raised effect or mark without significant material removal.&nbsp;The specific settings depend on the material, but generally involve a careful balance of heat and speed to achieve a specific surface change.

For the top half, I used laser settings that did etching. It was a very light pass and the acrylic still feels smooth.

For the bottom half I used settings that did engraving. The cuts are a bit deeper -- I can feel them when I run my hands over the surface.&nbsp;

I found that the etching works much better than the engraving in terms of how far the light is carried. The deeper cuts with engraving tend to make the light stop, where the shallower etching cuts simply glow as the light passes behind them.&nbsp;

The engraving also looks a little bit "fuzzier" -- it's not quite as sharp as the etching.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/857/medium640/led_strips_light_test_top.jpeg?1758653340)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/858/medium640/led_strips_light_test_bottom.jpeg?1758653356)

## Light Bleed

I attached my lights to the acrylic, then had to take them off again because my light was bleeding all over the place. These are delicate lights, so try to contain yourself and read through this section -- it may save you from breaking your light strand.

My original plan was to keep the acrylic all in one piece and just shine one or two lights at each quote to light it up. But perhaps because my edges are curved, or perhaps just because this acrylic carries light really well, I got a whole lot of light bleed. Even lighting just one LED would make multiple messages appear (faintly), and I could also see the edge where I'd cut the acrylic.

This is not the magic mirror I was looking for.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/859/medium640/led_strips_light_bleed.jpeg?1758653411)

I fixed this problem by cutting each message apart using the laser so that each one was on its own piece of acrylic. Then I used black PVC tape (think electrical tape but stickier) to mask the edges of each piece. I taped them all back together in the correct order, and this fixed the light bleed problem! Now, just one message would light up at a time.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/860/medium640/led_strips_laser_cutapart_%281%29.jpeg?1758653567)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/861/medium640/led_strips_black_tape2.jpeg?1758653661)

This solved two of my problems while creating a third problem: now I could see the black tape against the brown cardboard of the back of the frame. Still not quite the look I was going for.&nbsp;

I used some black matte spray paint and painted the inside of the backing piece flat black. This solved it! Now the quotes appear and I can (mostly) only see the words.

I still have a little bit of light bleed in a dark environment. It's also important to clean your mirror and your acrylic pieces thoroughly -- any speck of dust or fingerprint will also glow just a bit.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/863/medium640/led_strips_backing_cardboard.jpeg?1758653693)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/864/medium640/led_strips_backing_black.jpeg?1758653765)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/865/medium800/led_strips_working.jpeg?1758653802)

## Attach the Lights
Once all your messages are isolated and aligned, it's time to attach the lights.

I used PVC tape to affix the lights to the edge of the acrylic. These lights are just about exactly the correct width to cover the edge of 1/8" acrylic sheet. Lay the lights on top of the PVC tape to get them straight, then wrap the tape securely around the edges of the acrylic.

Remember, you only need lights where the messages are -- not necessarily along the whole mirror edge.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/866/medium640/led_strips_black_tape.jpeg?1758654118)

For my mirror, I needed lights along one edge at the top, where the quotes don't go all the way across and where I used laser etching instead of engraving.

At the bottom with the deeper engraved quotes that span the width of the mirror I ended up using a second strip on the other side. This made the mapping a little bit tricker, but also gives me the option to have 2 colors shining at the quote so I get a beautiful gradient effect.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/867/medium800/led_strips_one_step.jpg?1758654732)

# Magic Mirror with Glowing Secret Messages

## WLED Segments

For this project, we want to light up specific LEDs in specific colors, instead of lighting the whole strip at once. This will allow us to show one message at a time. In WLED, this is done using [Segments](https://kno.wled.ge/features/segments/).

When you first set up WLED, there's one segment pre-defined, and it's called Segment 0. This segment includes all your lights: I have 200 in my left-hand strand and 100 in the right-hand strand so the total here is 300. If I run an animation on segment 0, it will run down my first strip and then seamlessly down the second or any additional strips. The LED numbers are continuous, so the segment layouts don't need to match the physical layout of the strips.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/868/medium640/led_strips_segment0-3.jpg?1758655255)

Select "solid" under effects and choose a color.

Click the "add segment" button and create a new segment. Starting with LED 1, take a guess at how many lights you should turn on to light only your top message. Click the "check" button and look at your lights.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/869/medium640/led_strips_segment_setup.jpg?1758655418)

If all your lights are still on, click the "power" button to turn Segment 0 off and be sure the power button on the new segment is active. This should turn on LEDs 1-7 and only those LEDs.&nbsp;

Verify that it's lighting up the area you want and adjust the numbers if it's not.

Let's save this first segment before we move on. Otherwise we may do a lot of intricate mapping work and then discover that _poof_ ! It's gone forever.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/871/medium640/led_strips_segments-walkthrough.jpg?1758655711)

## Save your Segments
Segment layout can be saved using a Preset. Click the + Preset button and call your preset **All Segments**. Use the default settings and click "save".&nbsp;

Segments are preset-specific, meaning that different presets can (and often do) use completely different segment layouts. If you don't save your work in a preset, and then you select another preset that only has Segment 0 defined, all your segments will vanish.&nbsp;

This can be frustrating! So save early and save often. To update the preset after you've added more segments, click the "overwrite with state" checkbox and then click Save.

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/872/medium640/led_strips_save_segments.jpg?1758655926)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/876/medium640/led_strips_segments_add_save.jpg?1758657302)

Make a segment for the LEDs that light up each of your messages.&nbsp;

For my project I have 2 LED strips on either side of the mirror. They aren't laid out exactly the same on both sides. To make this work out and light both sides of the message I made two segments for those quotes: the "Imagination" segment contains LEDs 127-135 on the left, and the "Imagination2" segment uses 232-237 on the right.&nbsp;&nbsp;

Each segment can have its own animation and color choice. I used two different colors with the "solid" animation on these two segments to give a beautiful gradient effect.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/877/medium640/led_strips_segments_secondside.jpg?1758657489)

# Magic Mirror with Glowing Secret Messages

## WLED Presets

Once your segments are all set up and saved in your **All Segments** preset, it's time to make individual presets that light up each segment in the color and animation mode you like best.

WLED Presets are a way to "save" your favorite effect-and-color modes. They also accept JSON code, so you can use them to do things like turn the lights all on or off, string together multiple presets (make a playlist), create custom modes and much more. Here's the&nbsp;[WLED Presets Knowlege Base](https://kno.wled.ge/features/presets/) page -- check it out to learn more.

Select the background of the segment (it's selected when it's gray instead of black). Click the "power" button to turn it on, and make sure all the other segments are turned off.&nbsp;

Select the effect and the color you'd like for your message -- I used "solid" for everything, and used a variety of colors -- and then create a preset to save the state.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/139/878/medium640/led_strips_presets.jpg?1758657898)

Select the "Apply at Boot" checkbox on the preset you'd like to appear when the project is powered up.

Keep the "Save Segment Bounds" checkbox checked but do NOT check the "Checked Segments Only" box in this case. We want to save the state of ALL the segments -- the ones that are off need to stay off, and checking this box will ignore the state of the non-checked segments so you may end up with two messages on at the same time.

For the quotes at the bottom that have two segments / two LED strips, I made one preset that turns on both segments while the rest stay off.&nbsp;

You can run different animations or colors on each segment and still have them controlled by one preset. Nifty!

To update an existing preset, click the "overwrite with state" checkbox before saving.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/884/medium640/led_strips_thereisacrack.jpg?1758658687)

Once you have all your message presets set up with the colors you like, set up one more preset that turns all the lights off.

You can either uncheck all the segments, or choose "black" as your color, or you can use HTTP code (T=0) in the API command box (uncheck the "overwrite with state" box to find this).&nbsp;

[More about using API commands in WLED](https://kno.wled.ge/features/presets/#how-to-use)

Take note of the preset number since we'll need to use it when we set up our button.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/885/medium640/led_strips_off-preset.jpg?1758659048)

Finally, we'll make a playlist that we can trigger using our motion sensor. A playlist is a listing of presets that allows us to set a duration and an order for our presets and have them auto-play.

We can also "shuffle" the playlist in order to get a (pseudo) random order. On the next page we'll set up the motion sensor to trigger this playlist.

Click the +Playlist button at the bottom of the Preset column. Add each of your presets and set a time for how long you'd like each message to play. Make it a little longer than you need -- I chose 10 seconds.&nbsp;

Do not put your "off" preset in this playlist, only the lighted messages.

Click the "shuffle" checkbox and the "repeat indefinitely" checkbox. Take note of the playlist's number (18 in my case) and click Save.

Select the preset and watch all your quotes appear one by one.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/886/medium640/led_strips_playlist.jpg?1758659709)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/889/medium640/led_strips_preset2.jpg?1758659947)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/949/medium800/led_strips_one_step.jpeg?1758749371)

# Magic Mirror with Glowing Secret Messages

## PIR Sensor Setup

I drilled a 7/8" hole with a spade bit in the top of my mirror frame. This was just about the perfect size to press-fit the sensor from the back.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/952/medium640/led_strips_pir_sensor_drill.jpeg?1758750842)

Head to LED Preferences under Config and scroll down until you find the button setup section. Change Button 1 to pin 18, and select PIR sensor from the dropdown.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/950/medium640/led_strips_button1.jpg?1758749788)

Then head to the Time & Macros tab under Config and find the Button Actions section. For a PIR sensor, the **long press** field determines what happens when the sensor is triggered, and the **short press** field is what happens when the sensor is reset (i.e. no more motion).&nbsp;

Enter your "off" preset number into the **short press** field and your playlist of all the effects into the **long press** field.

![](https://cdn-learn.adafruit.com/assets/assets/000/139/951/medium640/led_strips_button_actions-2.jpg?1758749851)

Time to test it out! Wave your hand in front of the PIR sensor and one of your messages should appear. After a few seconds with no movement it will fade out, leaving a blank mirror until you move again.

## Troubleshooting

If it's not working, or you're getting erratic results, here are a few things to try:

If you're getting no response from the PIR sensor:

1. Make sure it's wired correctly. The red wire coming from the connector should be lined up with the +5v pin and the black wire should be going to G.
2. On the Sparkle Motion, be sure the red wire is going to +, black is G, and the yellow wire is soldered to pin 18. Inserting it into the screw terminal or using one of the Stemma ports won't work.
3. Use a multimeter to be sure the sensor is working. Check the DC voltage between power and G pins (should be 5v) and between power and data pins (should be 3.3v when the sensor is triggered, 0 when it's not being triggered).
4. Try setting up the button to trigger just one preset instead of your playlist and see if that works.

If the sensor works and triggers modes, but the behavior seems inconsistent:

1. Adjust the Duration of each preset in your playlist. It needs to be longer than the sensor's trigger time.
2. Adjust the trigger time of the sensor by turning the "Time" screw. It's very sensitive so just turn it a tiny bit until you get the results you want.
3. Adjust the sensitivity of the sensor with the other screw.
4. Double check that the jumper on your sensor is in position 2 (right-most pins) rather than position 1.&nbsp;

If you're getting multiple quotes lighting at once:

1. Recreate the preset: Turn off any segments you don't want on with the segment power button, then click the "overwrite with state" button on the preset and click save.
2. Be sure the "Checked Segments Only" button is unchecked as you create your presets.&nbsp;


## Featured Products

### Adafruit Sparkle Motion - All-In-One WLED and xLights Board

[Adafruit Sparkle Motion - All-In-One WLED and xLights Board](https://www.adafruit.com/product/6100)
The&nbsp; **Adafruit Sparkle Motion&nbsp;** is the flagship in&nbsp;our&nbsp;series of "Sparkle Motion" boards, that are our attempt to make the&nbsp;best small&nbsp;WLED-friendly smart LED driving board in the whole world. Our resident mermaid,&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/6100)
[Related Guides to the Product](https://learn.adafruit.com/products/6100/guides)
### Ultra Skinny NeoPixel 1515 LED Strip 4mm wide

[Ultra Skinny NeoPixel 1515 LED Strip 4mm wide](https://www.adafruit.com/product/4368)
We have all&nbsp;sorts of LED strips for a wide range of needs. [_Chonky_](https://www.adafruit.com/product/3869) strips? We got those! [Strips with alligator clips](https://www.adafruit.com/?q=neopixel%20alligator%20clips%20stripping%20wires) that are easy-peasy...

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

[PIR (motion) sensor](https://www.adafruit.com/product/189)
PIR sensors are used to detect motion from pets/humanoids from about 20 feet away (possibly works on zombies, not guaranteed). This one has an adjustable delay before firing (approx 2-4 seconds), adjustable sensitivity **and** we include a 1 foot (30 cm) cable with a socket so you...

In Stock
[Buy Now](https://www.adafruit.com/product/189)
[Related Guides to the Product](https://learn.adafruit.com/products/189/guides)
### Wall Power Supply with USB C - 5V 4A Output and Switch

[Wall Power Supply with USB C - 5V 4A Output and Switch](https://www.adafruit.com/product/5803)
We love the Raspberry Pi 4 and 5, with their fancy new USB Type C power connectors. Now we have an even better power supply that can be used with either a Pi 4 or even a Pi 5 with 5V output and **4 Amps** of current to handle builds with accessories and displays.&nbsp;This flat...

In Stock
[Buy Now](https://www.adafruit.com/product/5803)
[Related Guides to the Product](https://learn.adafruit.com/products/5803/guides)
### 3-pin JST SM Plug + Receptacle Cable Set

[3-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/1663)
These 3-wire cables are 163mm (6.4") long and come as a set. One cable has a JST SM type connector plug on the end. The other cable has a matching JST SM type receptacle connector. They are good for whenever you have 3 wires you want to be able to plug and unplug. We like the solid and...

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

## Related Guides

- [PIR Motion Sensor](https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor.md)
- [Adafruit Sparkle Motion](https://learn.adafruit.com/adafruit-sparkle-motion.md)
- [Adafruit HUZZAH ESP8266 breakout](https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout.md)
- [Raspberry Pi Wifi-Controlled Cat Laser Toy](https://learn.adafruit.com/raspberry-pi-wifi-controlled-cat-laser-toy.md)
- [Introducing the Adafruit WICED Feather WiFi](https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi.md)
- [Infinity Mirror Collar](https://learn.adafruit.com/infinity-mirror-collar.md)
- [Garden Path Lights with WLED and a Sunset Timer](https://learn.adafruit.com/garden-path-lights-with-sunset-timer.md)
- [Color Mixing QT Py Cuff Bracelet](https://learn.adafruit.com/color-mixing-qt-py-cuff.md)
- [Laser-Cut Layered LED Art Panel (Wood + Acrylic) with WLED](https://learn.adafruit.com/laser-cut-layered-led-art-panel-wood-acrylic-with-wled.md)
- [IoT Moon Phase Guide](https://learn.adafruit.com/moon-phase.md)
- [NeoPixel Light Slate](https://learn.adafruit.com/neopixel-light-slate.md)
- [NeoPixel Basketball Hoop](https://learn.adafruit.com/neopixel-mini-basketball-hoop.md)
- [Busy Box Interruption Sign](https://learn.adafruit.com/busy-box-interruption-sign.md)
- [Proximity Based Lighting](https://learn.adafruit.com/proximity-based-lighting.md)
- [Optical Sensor Drum Track Sequencer](https://learn.adafruit.com/drum-track-sequencer.md)
- [NeoPIO: Drive lots of LEDs with Raspberry Pi Pico](https://learn.adafruit.com/neopio-drive-lots-of-leds-with-raspberry-pi-pico.md)
- [Star Illusion: Laser Cut Audio-Reactive Light with WLED](https://learn.adafruit.com/star-illusion-laser-cut-audio-reactive-light-with-wled.md)
