# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Overview

https://youtu.be/xTHajSITNvE

> See the line where the sky meets the sea  
> It calls me  
> And no one knows, how far it goes  
> If the wind in my sail on the sea stays behind me  
> One day I'll know  
> If I go there's just no telling how far I'll go
> 
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- Moana: How Far I'll Go - (Lin Manuel Miranda)

Explore the depths of your own personal ocean. Epoxy resin, alcohol inks, sand, and seashells come together to make a magical luminous ocean experience for your wall or desk. Each piece you create will come out unique, colorful, and beautiful.

![](https://cdn-learn.adafruit.com/assets/assets/000/093/943/medium800/led_matrices_heart.jpeg?1597009619)

## Difficulty Level

The electronics assembly is pretty simple - the only soldering you'll need to do is stacking and assembling the Feather and FeatherWing. The LED matrix plugs into the FeatherWing and into the wall using connectors, so doesn't need to be soldered at all.

Epoxy resin is tricky by nature. Temperature, humidity, and dust need to be managed with any resin project. However, as resin projects go, I've found this to be about the easiest one I've ever done -- and also the hardest to mess up. Stray bubbles or dust motes in your resin actually add depth and interest to this particular project - more bubbles make the ocean waves look more realistic! And as you'll see, mixing and pouring all the pretty colors is incredibly satisfying.&nbsp;

The software and coding requires a little bit of setup if you haven't used CircuitPython before. Once you're set up, you can copy and paste our code and images or dig in and customize with your own artwork.

## Parts
### 64x32 RGB LED Matrix - 4mm pitch

[64x32 RGB LED Matrix - 4mm pitch](https://www.adafruit.com/product/2278)
Bring a little bit of Times Square into your home with this sweet 64 x 32 square RGB LED matrix panel. These panels are normally used to make video walls, here in New York we see them on the sides of busses and bus stops, to display animations or short video clips. We thought they looked...

In Stock
[Buy Now](https://www.adafruit.com/product/2278)
[Related Guides to the Product](https://learn.adafruit.com/products/2278/guides)
![Two white hands hold out an assembled and powered on 64x32 RGB LED Matrix Panel - 4mm pitch. The matrix displays "Adafruit Industries LED MATRIX! 32x64 *RGB*"](https://cdn-shop.adafruit.com/640x480/2278-00.jpg)

### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
![Angled shot of a Adafruit Feather M4 Express. ](https://cdn-shop.adafruit.com/640x480/3857-10.jpg)

### Adafruit RGB Matrix Featherwing Kit

[Adafruit RGB Matrix Featherwing Kit](https://www.adafruit.com/product/3036)
Ahoy! It's time to create a dazzling light up project with our new **RGB Matrix FeatherWing**. Now you can quickly and easily create projects featuring your favorite 16 or 32-pixel tall matrix boards. Using our RGB Matrix library is easy and...

In Stock
[Buy Now](https://www.adafruit.com/product/3036)
[Related Guides to the Product](https://learn.adafruit.com/products/3036/guides)
![Video of a woman with a turquoise manicure attaching a driver board to the back of a LED matrix panel. She flips the matrix panel around reveal it lit up text in rainbow colors: "Ada
fruit
32x32
*RGB* ](https://cdn-shop.adafruit.com/product-videos/640x480/3036-05.jpg)

### 5V 4A (4000mA) switching power supply - UL Listed

[5V 4A (4000mA) switching power supply - UL Listed](https://www.adafruit.com/product/1466)
Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to **4 Amps** (4000mA). 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one up at any hardware store for $1 or so,...

In Stock
[Buy Now](https://www.adafruit.com/product/1466)
[Related Guides to the Product](https://learn.adafruit.com/products/1466/guides)
![Angled shot of 5V 4A switching power supply brick with power cable.](https://cdn-shop.adafruit.com/640x480/1466-10.jpg)

### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

If you want an easy on/off switch for your project, I recommend this one - it plugs right inline into your power cord.

### Part: Power Switch
quantity: 1
In-line power switch for 2.1mm barrel jack
[Power Switch](https://www.adafruit.com/product/1125)

I also used rare earth magnets to fasten the resin panel to the shadow box.&nbsp;

### Part: Magnets
quantity: 4
High-strength 'rare earth' magnet
[Magnets](https://www.adafruit.com/product/9)

## Additional Materials Used

My ocean is 12"x12". If you're making a similar sized ocean you'll need about 2 cups of table top resin or casting resin, alcohol inks and mica powder for color, and a piece of clear acrylic or glass to act as your "canvas".&nbsp; You'll also need gloves, mixing cups and stirring sticks and various other accessories. I've made an [Amazon shopping cart](https://www.amazon.com/hz/wishlist/ls/11IIAZ70KPLSD?ref_=wl_share) with everything I use when I'm pouring resin.

You'll also need an enclosure for the electronics. I built my own out of spare plastic sheeting I had in my shop, but you could also use a clear plastic tray or a [shadow box](https://www.amazon.com/dp/B07ZNQZKPX/?coliid=I2JY4WYQZSYSXK&colid=11IIAZ70KPLSD&psc=1) frame for your project. Just be sure it's at least 2-3 inches deep to give enough space for the electronics and a little extra room for diffusion.

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/093/964/medium800/led_matrices_wiring_diagram.jpg?1597076813)

The FeatherWing comes with all the connectors you need. We'll solder the headers onto the Feather M4 and FeatherWing, then plug the RGB Matrix in with the included connectors.

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## CircuitPython on Feather M4 Express

[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 (which appears as a USB flash drive when you plug the board into your computer via a USB cable) to iterate.

The following instructions will show you how to install CircuitPython. If you've already installed CircuitPython but are looking to update it or reinstall it, the same steps work for that as well!

## Set up CircuitPython Quick Start!

Follow this quick step-by-step for super-fast Python power :)

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

Download and save it to your desktop (or wherever is handy).

![arduino_compatibles_FeatherM0ExpressUF2Downloaded.png](https://cdn-learn.adafruit.com/assets/assets/000/057/318/medium640/arduino_compatibles_FeatherM0ExpressUF2Downloaded.png?1531152402)

Plug your Feather M4 into your computer using a known-good USB cable.

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

Double-click the **Reset** button next to the USB connector on your board, and you will see the NeoPixel RGB LED turn green. If it turns red, check the USB cable, try another USB port, etc. **Note:** The little red LED next to the USB connector will pulse red. That's ok!

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

![arduino_compatibles_FeatherM0Bootloader.jpg](https://cdn-learn.adafruit.com/assets/assets/000/057/320/medium640/arduino_compatibles_FeatherM0Bootloader.jpg?1531152568)

You will see a new disk drive appear called **FEATHERBOOT**.

&nbsp;

&nbsp;

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **FEATHERBOOT.**

![arduino_compatibles_FeatherM0FEATHERBOOT.png](https://cdn-learn.adafruit.com/assets/assets/000/057/321/medium640/arduino_compatibles_FeatherM0FEATHERBOOT.png?1531152779)

![arduino_compatibles_FeatherM0DragCircuitPythonUF2.png](https://cdn-learn.adafruit.com/assets/assets/000/057/324/medium640/arduino_compatibles_FeatherM0DragCircuitPythonUF2.png?1531152877)

The LED will flash. Then, the **FEATHERBOOT** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

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

![arduino_compatibles_FeatherM0CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/057/323/medium640/arduino_compatibles_FeatherM0CIRCUITPY.png?1531152841)

## Further Information

For more detailed info on installing CircuitPython, check out [Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython).

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## CircuitPython Code

## Installing or upgrading CircuitPython

You should ensure you have CircuitPython 5.3 or greater on your board. Plug your board in with a known good data + power cable (not the cheesy USB cable that comes with USB power packs, they are power only). You should see a new flash drive pop up.

If the drive is **CIRCUITPY** , then open the **boot\_out.txt** file to ensure the version number is 5.3 or greater.&nbsp;

```python
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Feather M4 Express with samd51j19
```

If the version is less than 5 -or- you only get a drive named **FEATHERBOOT** then follow the [Feather M4 guide](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51) on [installing CircuitPython](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/circuitpython).

## Download the Adafruit CircuitPython Library Bundle

In order to run the code, we'll need to download a few libraries. Libraries contain code to help interface with hardware a lot easier for us.

Use the&nbsp;[Feather M4 page on Installing Libraries](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/circuitpython-libraries)&nbsp;to get the library that matches the major version of CircuitPython you are using noted above.

The green button below links to a file containing all the libraries available for CircuitPython. To run the code for this project, we need a few of the libraries in the list below. Unzip the library bundle and search for the libraries. Drag and drop the files into a folder named **lib** on the **CIRCUITPY** drive (create the folder if it is not already on the Feather M4).

[Click for the Latest Adafruit Library Bundle Release](https://circuitpython.org/libraries)
## Required Libraries&nbsp;

- **adafruit\_bus\_device (directory)**
- **adafruit\_display\_shapes (directory)**
- **adafruit\_imageload (directory)**

You'll also need the .bmp files. You can add your own files or customize ours. If you're adding your own .bmp files, be sure they're 64 pixels wide. I had the most success when I saved as 8 bit color-indexed files.

[Download .bmp files](https://cdn-learn.adafruit.com/assets/assets/000/093/934/original/bmp.zip?1596925035)
Once we have all the files we need, a directory listing will look similar to below as far as files and directories.

![](https://cdn-learn.adafruit.com/assets/assets/000/094/040/medium800/led_matrices_circuitpy.jpg?1597173723)

## Upload Code

Click on the Download: Project Zip link below to grab the project files in a zip file directly from GitHub. Place the **code.py** file and bitmap graphics files&nbsp;onto the **CIRCUITPY** main (root) directory. The code will run properly when all of the files have been uploaded including libraries.

Use any text editor or favorite IDE to modify the code. We suggest using Mu as noted above.

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

## Double Check

See the directory listing above and double check that you have all the files listed to make this project function. If any are missing or in an incorrect directory, move them so they're in the right places.

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Code Explanation

# Understanding the code

There is a lot going on to bring these images to life on the LED matrix, so let's break things down a little bit.

Begin by importing the necessary modules and ensuring that we can create our display:

```python
import math
import time
import random

import adafruit_imageload.bmp
import board
import displayio
import framebufferio
import rgbmatrix
import ulab

displayio.release_displays()
```

RGBMatrix doesn't have a brightness control, so the `Reshader` class uses [ulab](https://learn.adafruit.com/ulab-crunch-numbers-fast-with-circuitpython) to quickly apply a brightness value from 0.0 to 1.0 to an original palette, updating the palette accordingly. This code works pretty quickly, especially when you make sure your images have a pallette of just a few dozen colors.

```python
class Reshader:
    '''reshader fades the image to mimic brightness control'''
    def __init__(self, palette):
        self.palette = palette
        ulab_palette = ulab.numpy.zeros((len(palette), 3))
        for i in range(len(palette)):
            rgb = int(palette[i])
            ulab_palette[i, 2] = rgb &amp; 0xff
            ulab_palette[i, 1] = (rgb &gt;&gt; 8) &amp; 0xff
            ulab_palette[i, 0] = rgb &gt;&gt; 16
        self.ulab_palette = ulab_palette

    def reshade(self, brightness):
        '''reshader'''
        palette = self.palette
        shaded = ulab.numpy.array(self.ulab_palette * brightness, dtype=ulab.numpy.uint8)
        for i in range(len(palette)):
            palette[i] = tuple(shaded[i])
```

`do_crawl_down` makes an image move from the top of the screen to the bottom. Here are what all the parameters mean:&nbsp; `image_file` is the filename of an image. Images up to 64x64 pixels work best. `speed` is the down speed in pixels per second. `weave` gives the amount the image weaves left and right, 0 for no weave. `weave_speed` controls how quickly the weave goes. `pulse` controls how much the brightness changes, values from 0 (no brightness change) to 0.5 work well.

By working with time in integer nanoseconds, we avoid rounding errors that occur when working with time in floating-point seconds. It makes the code a bit more complicated, but avoids the animation becoming "jerky" after running continuously for more than a day or so.

```python
def do_crawl_down(image_file, *,
                  speed=12, weave=4, pulse=.5,
                  weave_speed=1/6, pulse_speed=1/7):
    '''function to scroll the image'''
    the_bitmap, the_palette = adafruit_imageload.load(
        image_file,
        bitmap=displayio.Bitmap,
        palette=displayio.Palette)

    shader = Reshader(the_palette)

    group = displayio.Group()
    tile_grid = displayio.TileGrid(bitmap=the_bitmap, pixel_shader=the_palette)
    group.append(tile_grid)
    display.root_group = group

    start_time = time.monotonic_ns()
    start_y = display.height   # High enough to be "off the top"
    end_y = -the_bitmap.height     # Low enough to be "off the bottom"

    # Mix up how the bobs and brightness change on each run
    r1 = random.random() * math.pi
    r2 = random.random() * math.pi

    y = start_y
    while y &gt; end_y:
        now = time.monotonic_ns()
        y = start_y - speed * ((now - start_time) / 1e9)
        group.y = round(y)

        # wave from side to side
        group.x = round(weave * math.cos(y * weave_speed + r1))

        # Change the brightness
        if pulse &gt; 0:
            shader.reshade((1 - pulse) + pulse * math.sin(y * pulse_speed + r2))

        display.refresh(minimum_frames_per_second=0, target_frames_per_second=60)
```

`do_pulse` omits the movement part of do\_crawl\_down, so it's basically a simplified version of `do_crawl_down`.

```python
def do_pulse(image_file, *, duration=4, pulse_speed=1/8, pulse=.5):
    '''pulse animation'''
    the_bitmap, the_palette = adafruit_imageload.load(
        image_file,
        bitmap=displayio.Bitmap,
        palette=displayio.Palette)

    shader = Reshader(the_palette)

    group = displayio.Group()
    tile_grid = displayio.TileGrid(bitmap=the_bitmap, pixel_shader=the_palette)
    group.append(tile_grid)
    group.x = (display.width - the_bitmap.width) // 2
    group.y = (display.height - the_bitmap.height) // 2
    display.root_group = group

    start_time = time.monotonic_ns()
    end_time = start_time + int(duration * 1e9)

    now_ns = time.monotonic_ns()
    while now_ns &lt; end_time:
        now_ns = time.monotonic_ns()
        current_time = (now_ns - start_time) / 1e9

        shader.reshade((1 - pulse) - pulse
                       * math.cos(2*math.pi*current_time*pulse_speed)**2)

        display.refresh(minimum_frames_per_second=0, target_frames_per_second=60)
```

Create the display object. Check out our [dedicated guide for rgbmatrix](https://learn.adafruit.com/rgb-led-matrices-matrix-panels-with-circuitpython) to find pinouts for other boards besides the Feather M4 Express!

```python
matrix = rgbmatrix.RGBMatrix(
width=64, height=32, bit_depth=5,
rgb_pins=[board.D6, board.D5, board.D9, board.D11, board.D10, board.D12],
addr_pins=[board.A5, board.A4, board.A3, board.A2],
clock_pin=board.D13, latch_pin=board.D0, output_enable_pin=board.D1)
display = framebufferio.FramebufferDisplay(matrix, auto_refresh=False)
```

Choose randomly from 5 different effects. By using different images and different combinations of parameters, there's more variety. Why not try picking your own combinations, and see what you like best! Head to the next page for more information about customizing this with your own images.

```python
# Image playlist - set to run randomly. Set pulse from 0 to .5
while True:
    show_next = random.randint(1, 5) #change to reflect how many images you add
    if show_next == 1:
        do_crawl_down("/ray.bmp")
    elif show_next == 2:
        do_crawl_down("/waves1.bmp", speed=7, weave=0, pulse=.35)
    elif show_next == 3:
        do_crawl_down("/waves2.bmp", speed=9, weave=0, pulse=.35)
    elif show_next == 4:
        do_pulse("/heart.bmp", duration=4, pulse=.45)
    elif show_next == 5:
        do_crawl_down("/dark.bmp")
```

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Add Custom Images

This code scrolls .bmp images from the bottom of the screen to the top. I've placed the screen upside-down inside my project so it looks like the images are scrolling downwards.

The images also fade in and out, and can weave back and forth for a more organic feel. The code has variables to make it easy to customize the way each of your images behaves.

Look at the bottom of the code to find the `while True` section.

```python
while True:
    show_next = random.randint(1, 5) #change to reflect how many images you add
    if show_next == 1: 
        crawl_down(display, "/ray.bmp")
    elif show_next == 2:
        crawl_down(display, "/waves1.bmp", speed=7, weave=0, pulse=.35)
    elif show_next == 3:
        crawl_down(display, "/waves2.bmp", speed=9, weave=1, pulse=.35)
    elif show_next == 4:
        pulse(display, "/heart.bmp", duration=4, pulse=.45)
    elif show_next == 5:
        crawl_down(display, "/dark.bmp")
```

To customize your image scroller:

1. Save your 64px wide .bmp images at the root of the **CIRCUITPY** drive along with the sample images we've included.
2. Update this part of your code so the .bmp names match the names of your files.&nbsp;
3. If you have more or fewer than 5 files, change the `random.randint(1, 5)` line to reflect the number of images (or separate instances of the same image) you want to add. For example, if you have only 3 files, it should read `random.randint(1, 3)```
4. Customize the behavior of each image by modifying the `speed`, `weave`, `pulse`, and `duration` variables. The `pulse` variable should be between 0 and 0.5. A value of .45 seems to work well for an image that doesn't fade out completely.

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Resin Ocean

Gather all your supplies. Once the resin is mixed you'll have a limited amount of time to pour before it starts setting up, so it's good to have everything close to hand.&nbsp;

![led_matrices_00_supplies.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/910/medium640/led_matrices_00_supplies.jpeg?1596918538)

## Supplies

You can get a lot of this stuff at your local hardware or craft store, or here is my [Resin Art Shopping Cart](https://www.amazon.com/hz/wishlist/ls/11IIAZ70KPLSD?ref_=wl_share) ![](//ir-na.amazon-adsystem.com/e/ir?t=firepixie-20&l=ur2&o=1) at Amazon.com if you want to order everything at once.&nbsp;

- 2-part Epoxy Resin - Table Top resin or casting resin will work for smaller projects
- Alcohol inks for coloring in at least 3-4 colors - I used blue, sapphire, cerulean, teal, and green
- Mica powder in white for the surf
- Protective gloves
- A graduated measuring cup
- A larger plastic cup for mixing&nbsp;
- Stirring sticks
- 5-6 smaller cups for mixing individual colors (I used dixie cups, similar small cups are great)
- Glass or plastic or other translucent "canvas" - mine is a 12x12 piece of 1/4" acrylic
- Mirror effect spray paint
- Sand paper
- Heat gun
- Paper towels for cleanup
- Plastic drop cloths
- Something to place under your canvas to elevate it off the table
- White sand
- Seashells or other 3d decor

You'll want to work in a dust-free environment, with low humidity and a temperature range that matches the recommended working temperature on your resin. This brand recommends 75-85F, so I also have a space heater and an air purifier in my work area.

If your acrylic is perfectly clear, it'll be easy to see through the ocean waves and spot the electronics inside. To prevent this, I prepped my acrylic by sanding it with a piece of sandpaper on both sides until it was nice and cloudy.&nbsp;

Then I sprayed one side with 1-2 coats of Mirror Effect spray paint. This will create a semi-translucent one-way mirror effect. It's one of my favorite ways to create a soft diffusion with LED lights. Go easy on this - you can always add another layer of paint later on to the back of your piece if it's too transparent.

Place the acrylic on your plastic-covered table, with a piece of wood or something underneath so the drips can fall off the edges easily onto your plastic.

### How Much Resin?

The amount to use will depend on the size of your piece. My resin bottle said that 1 gallon would cover 12 square feet at 1/8" thick, so for 1 square foot I used 1/12 of a gallon, or 16 ounces. That's two cups, which makes measuring super easy - I used **one cup of part A and one cup of part B**.

Follow the directions on your resin bottle, paying attention to working temperatures and mixing times. I'm using table top resin, which wants to be mixed for five full minutes. Don't under-mix, or your resin won't cure evenly.&nbsp;

Mix it by hand with a stirring stick, and mix slowly to minimize the amount of bubbles that get pulled into your resin. Scrape the sides and bottom of the cup and your stirring stick while you mix.

![led_matrices_01_mix_resin.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/911/medium640/led_matrices_01_mix_resin.jpeg?1596920538)

Set out your small mixing cups. Have one for each alcohol-ink color you're using, one for the white mica powder, and one for the sand.

Pour about 1 inch of resin into each of your small cups. Make sure to keep about 1/4 of the resin in reserve in the main stirring cup - we'll need some clear resin too so don't color it all.

Mix in about 1/4 teaspoon of white mica powder into the cup. Mix it well. Add more if it doesn't look opaque enough.

![led_matrices_02_colors.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/912/medium640/led_matrices_02_colors.jpeg?1596920663)

Add a few drops of alcohol inks to each of your color cups. Don't go overboard - we want translucent color - but make them nice and bright.

Stir about 1/4 c of white sand into your remaining cup. Add enough resin to the sand that it's sticky and gloppy without being runny. We want the sand to pile up a bit.

Start in a corner of your piece with the sand. Pile it up until it looks beachy.&nbsp;

Pour the colored resin in waves, leaving the area by the beach empty for now - we'll fill that part with clear resin in a bit.

![led_matrices_20_resinpour.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/913/medium640/led_matrices_20_resinpour.jpeg?1596921411)

Use your gloved fingertips to gently mix the colors until you have a nice ocean-y gradient.

Pour some of your clear resin into the gap and mix that in as well.&nbsp;

Wait about 2 minutes to let the resin just start to set up. If bubbles form on the surface, use your heat gun about 6-8 inches above the surface to gently heat the air and pop the bubbles.

We want the resin to be a bit firm so the white "surf" floats on the top instead of mixing into the blues and greens.

![led_matrices_21_mix.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/914/medium640/led_matrices_21_mix.jpeg?1596921499)

While you're waiting, dip your sea shells into the clear resin to coat them. This will make them stick to your piece better, and the extra resin will pool around their base, making them look like they're sitting in wet sand. Place them firmly into the sand-resin mixture.

After your 2 minutes are up, pour a couple stripes of white resin where you want the waves to go. Be sparing with the white! You can always add more, but it's easy to get too much.

Now for the fun part: grab your hair drier and turn it to "high". Blow warm air across the resin and watch the ocean waves appear.

Let it pour off the edges a bit, and make sure your whole piece is covered.

![led_matrices_22_hairdryer.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/915/medium640/led_matrices_22_hairdryer.jpeg?1596921556)

I let my piece dry overnight, then mixed up a little more resin and added a second wave on top of the first wave.&nbsp;

![led_matrices_25_secondpour.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/916/medium640/led_matrices_25_secondpour.jpeg?1596921650)

Let your piece cure for the recommended time specified in the directions - usually 24-48 hours. Trim off any drips on the back of your piece with a pair of flush-cut snips.

![](https://cdn-learn.adafruit.com/assets/assets/000/093/917/medium800/led_matrices_08_second_wave.jpeg?1596922039)

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Electronics Assembly

The Feather M4 Express and RGB FeatherWing make this project really easy. We'll assemble the FeatherWing, stack it on top of the Feather, and then plug in the rest of the connections.

![led_matrices_10_electronics.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/918/medium640/led_matrices_10_electronics.jpeg?1596922552)

## Assemble the FeatherWing
Find all the pieces for your FeatherWing - they are all included with the board. First we'll solder on the headers, then the rest of the connectors.

If you haven't soldered headers before, it seems scary but is really pretty straightforward. Check our our [Guide to Excellent Soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for tips.&nbsp;

![led_matrices_11_rgb_wing.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/919/medium640/led_matrices_11_rgb_wing.jpeg?1596922622)

We'll be inserting the headers into the outer rows of holes on either side of the FeatherWing, so we need to make sure we have the right number of pins. One of them is right. The other needs to be shortened - I had to break 4 pins off my second header to get it into shape.

![led_matrices_12_feather_headers.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/920/medium640/led_matrices_12_feather_headers.jpeg?1596922876)

The easiest way to neatly line up the headers is to use a [solderless breadboard](https://www.adafruit.com/product/4539) to hold them. Put the long end of the pins into the breadboard, and place the FeatherWing face up on the short end of the pins as shown. Solder all the pins in place.

![led_matrices_13_breadboard.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/921/medium640/led_matrices_13_breadboard.jpeg?1596922972)

![led_matrices_14_headers_solder.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/922/medium640/led_matrices_14_headers_solder.jpeg?1596923033)

Next we'll add the screw terminal. This will connect power from the RGB Matrix to the board.&nbsp;

Look closely to be sure you've got it aligned correctly. The slope faces toward the outside of the board.

Flip it over and solder the underside of the pins to the copper pads.

![led_matrices_16_terminal.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/923/medium640/led_matrices_16_terminal.jpeg?1596923126)

![led_matrices_15_headers_done.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/924/medium640/led_matrices_15_headers_done.jpeg?1596923196)

Next, solder the DC power jack onto the other end of the FeatherWing.

![led_matrices_18_powerterm.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/925/medium640/led_matrices_18_powerterm.jpeg?1596923214)

![led_matrices_17_underside.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/926/medium640/led_matrices_17_underside.jpeg?1596923224)

Finally, add the ribbon cable connector. Look for the cutout on the side of the connector and align it with the cutout symbol etched on the board to be sure you've got it the right way around.

![led_matrices_20_finished.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/927/medium640/led_matrices_20_finished.jpeg?1596923280)

![led_matrices_19_underside.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/928/medium640/led_matrices_19_underside.jpeg?1596923322)

## Stack the Feather M4
Finally, grab your Feather M4 Express and place it onto the long side of the header pins you soldered in step 1. Solder the pins in place on the Feather M4.&nbsp;

That's it for the soldering!

![led_matrices_22_stacked.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/929/medium640/led_matrices_22_stacked.jpeg?1596923360)

## Final Assembly
Find the power connector that came with your RGB panel. Cut off the screw terminal connectors with wire cutters and strip just a bit of shielding from each wire.

Insert the wires into your screw terminal on your FeatherWing, being sure to line up the red wire with + and the black wire with -, as shown. Screw the ports tightly down on the wires with a small screwdriver.

![led_matrices_23_cut_powerwires.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/930/medium640/led_matrices_23_cut_powerwires.jpeg?1596923500)

![led_matrices_24_insert.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/093/931/medium640/led_matrices_24_insert.jpeg?1596923585)

Plug the power cable from the screw terminal into the plug on the back of your matrix, and plug the ribbon cable in on both ends. Plug in your power supply. Flip your panel over and be sure it's working.

![led_matrices_26_pluggedin.png](https://cdn-learn.adafruit.com/assets/assets/000/093/933/medium640/led_matrices_26_pluggedin.png?1596923750)

## Troubleshooting

If your panel doesn't light up, here are some things to try:

- Re-upload your software, or load some test code. Really with this build, the software is the most likely culprit for mishaps.
- Are there any "bridged" solder joints on your board? Be sure none of the pins are touching each other.
- Try plugging the ribbon cable into the other port on the back of the matrix.
- Wiggle all your connections, especially the screw terminal connections which can sometimes be tricky to get tight.

If none of this helps, head over to the [RGB FeatherWing guide](https://learn.adafruit.com/rgb-matrix-featherwing) for more suggestions.

# Ocean Epoxy Resin Lightbox with RGB LED Matrix Image Scroller

## Final Assembly

Drill a hole in the side or the back of your frame to let the power cord through. I used a rotary tool for this.

Use hot glue to secure your power cord, Feather, and LED matrix in place inside your frame. I found it worked well to glue along the top edge of the matrix and fix that to the top of the frame, since it doesn't sit flat inside the box.

![led_matrices_glue_down_components.png](https://cdn-learn.adafruit.com/assets/assets/000/093/935/medium640/led_matrices_glue_down_components.png?1597007342)

![led_matrices_glue_Edge.png](https://cdn-learn.adafruit.com/assets/assets/000/093/936/medium640/led_matrices_glue_Edge.png?1597007452)

To attach the resin piece to the frame, I used four rare earth magnets and four spare nuts from a jar in my shop. I used E6800 glue to secure the bolts to the inside of the frame, about 1/4" down from the top.

![led_matrices_glue_magnets.png](https://cdn-learn.adafruit.com/assets/assets/000/093/937/medium640/led_matrices_glue_magnets.png?1597007481)

![led_matrices_gluemagnets2.png](https://cdn-learn.adafruit.com/assets/assets/000/093/938/medium640/led_matrices_gluemagnets2.png?1597007589)

Measure between the bolts and place the magnets on the back of the acrylic where they'll meet up and fit snugly. Use a generous amount of glue and let it dry completely - these magnets are STRONG and will overrule weaker glue.

![led_matrices_measure.png](https://cdn-learn.adafruit.com/assets/assets/000/093/939/medium640/led_matrices_measure.png?1597007632)

![led_matrices_magnets_ocean.png](https://cdn-learn.adafruit.com/assets/assets/000/093/940/medium640/led_matrices_magnets_ocean.png?1597007661)

If you are adding the inline on/off switch, plug it into the Feather and the power cord and mount it someplace convenient on the edge of your box - you may need to drill another hole depending on your setup.

Hang it on a wall with picture hanging hardware or set it on your desk like a picture frame. Enjoy your beautiful, magical, bioluminescent ocean.

![](https://cdn-learn.adafruit.com/assets/assets/000/093/944/medium800/led_matrices_heart.jpeg?1597009630)


## Featured Products

### 64x32 RGB LED Matrix - 4mm pitch

[64x32 RGB LED Matrix - 4mm pitch](https://www.adafruit.com/product/2278)
Bring a little bit of Times Square into your home with this sweet 64 x 32 square RGB LED matrix panel. These panels are normally used to make video walls, here in New York we see them on the sides of busses and bus stops, to display animations or short video clips. We thought they looked...

In Stock
[Buy Now](https://www.adafruit.com/product/2278)
[Related Guides to the Product](https://learn.adafruit.com/products/2278/guides)
### Adafruit Feather M4 Express - Featuring ATSAMD51

[Adafruit Feather M4 Express - Featuring ATSAMD51](https://www.adafruit.com/product/3857)
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the **ATSAMD51J19** -&nbsp; with...

In Stock
[Buy Now](https://www.adafruit.com/product/3857)
[Related Guides to the Product](https://learn.adafruit.com/products/3857/guides)
### Adafruit RGB Matrix Featherwing Kit

[Adafruit RGB Matrix Featherwing Kit](https://www.adafruit.com/product/3036)
Ahoy! It's time to create a dazzling light up project with our new **RGB Matrix FeatherWing**. Now you can quickly and easily create projects featuring your favorite 16 or 32-pixel tall matrix boards. Using our RGB Matrix library is easy and...

In Stock
[Buy Now](https://www.adafruit.com/product/3036)
[Related Guides to the Product](https://learn.adafruit.com/products/3036/guides)
### 5V 4A (4000mA) switching power supply - UL Listed

[5V 4A (4000mA) switching power supply - UL Listed](https://www.adafruit.com/product/1466)
Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to **4 Amps** (4000mA). 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one up at any hardware store for $1 or so,...

In Stock
[Buy Now](https://www.adafruit.com/product/1466)
[Related Guides to the Product](https://learn.adafruit.com/products/1466/guides)
### In-line power switch for 2.1mm barrel jack

[In-line power switch for 2.1mm barrel jack](https://www.adafruit.com/product/1125)
Add a power switch to _any_ project simply by plugging this between the power supply. This is the most useful thing you never knew you needed! You'll want to pick up a bunch for your electronic projects.  
  
Comes with a 5.5/2.1mm barrel jack on one end an a plug on the...

In Stock
[Buy Now](https://www.adafruit.com/product/1125)
[Related Guides to the Product](https://learn.adafruit.com/products/1125/guides)
### High-strength 'rare earth' magnet

[High-strength 'rare earth' magnet](https://www.adafruit.com/product/9)
Yow! These things are super powerful. .47" diameter and .18" thick discs. Great for use with your SpokePOV Kit. If you have an aluminium frame, use tape/foam sticky tape to attach it.

In Stock
[Buy Now](https://www.adafruit.com/product/9)
[Related Guides to the Product](https://learn.adafruit.com/products/9/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

Out of Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Adafruit Matrix Portal - CircuitPython Powered Internet Display

[Adafruit Matrix Portal - CircuitPython Powered Internet Display](https://www.adafruit.com/product/4745)
Folks love our [wide selection of RGB matrices](https://www.adafruit.com/category/327) and accessories, for making custom colorful LED displays... and our RGB Matrix Shields and FeatherWings can be quickly soldered together to make the wiring much easier. But what if we made it...

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

## Related Guides

- [Adafruit Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.md)
- [Adafruit RGB Matrix FeatherWings](https://learn.adafruit.com/rgb-matrix-featherwing.md)
- [Adafruit MatrixPortal M4](https://learn.adafruit.com/adafruit-matrixportal-m4.md)
- [Animated GIF Player for Matrix Portal](https://learn.adafruit.com/animated-gif-player-for-matrix-portal.md)
- [Matrix Portal Creature Eyes](https://learn.adafruit.com/matrix-portal-creature-eyes.md)
- [Adafruit RGB Matrix + Real Time Clock HAT for Raspberry Pi](https://learn.adafruit.com/adafruit-rgb-matrix-plus-real-time-clock-hat-for-raspberry-pi.md)
- [Cardboard Window Skull With Animated LED Eyes](https://learn.adafruit.com/cardboard-window-skull-animated-led-eyes.md)
- [Make It Glow With Crickit](https://learn.adafruit.com/make-it-glow-with-crickit.md)
- [Purple Air AQI Display](https://learn.adafruit.com/purple-air-aqi-display.md)
- [LED Matrix Scoreboard](https://learn.adafruit.com/led-matrix-scoreboard.md)
- [Ambient Color Control Pad](https://learn.adafruit.com/ambient-color-controller.md)
- [Shake Away 2021 with MatrixPortal](https://learn.adafruit.com/matrixportal-shake-away-2020.md)
- [Light Up Prop with Prop-Maker](https://learn.adafruit.com/prop-maker-light-wand.md)
- [Matrix Portal M4 Boxing Interval Timer](https://learn.adafruit.com/matrix-portal-m4-boxing-interval-timer.md)
- [Esenciales para CircuitPython](https://learn.adafruit.com/esenciales-para-circuitpython.md)
- [IoT Air Quality Sensor with Adafruit IO](https://learn.adafruit.com/diy-air-quality-monitor.md)
- [Halloween Countdown Display Matrix](https://learn.adafruit.com/halloween-countdown-display-matrix.md)
- [Neo Trinkey Zoom Shortcuts](https://learn.adafruit.com/neo-trinkey-zoom-shortcuts.md)
