# LED Trampoline

## Overview

https://youtu.be/46oyP1UV6fY

## Interactive NeoPixels

In this project we'll build an LED Trampoline.&nbsp;This is a really fun project that lights up when you jump on it! These trampolines are meant for exercising and jumping on this thing for just a few minutes feels like a working out so perfect for tiring out kids, just be sure to supervise them.&nbsp;It works really well and looks amazing at night, especially around a fire pit with a fog machine.

![](https://cdn-learn.adafruit.com/assets/assets/000/052/792/medium800/led_strips_hero-rainbow.jpg?1523062463)

## Trampoline

I found [this trampoline](https://www.walmart.com/ip/Calm-36-Inch-Trampoline-Cardio-Blue/265966558) at my local Wal-Mart near the sporting goods isle. It was about $25. It has 6 detachable legs which is convenient for storing. It's meant for cardio workouts and features elastic straps instead of metal springs, which is pretty nice.

![led_strips_36in-trampoline.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/052/719/medium640/led_strips_36in-trampoline.jpeg?1522764758)

### Part: 36" Trampoline
quantity: 1
Calm 36-Inch Trampoline Cardio
[36" Trampoline](https://www.walmart.com/ip/Calm-36-Inch-Trampoline-Cardio-Blue/265966558)

## Reel of NeoPixel LEDs

The trampoline is about 36 inches in diameter, which is fairly large so I used a [3 meter long LED strip](https://www.adafruit.com/product/1376?length=3) to wrap around the whole framing. There's a little bit extra here, about 10 pixels, but this should give us plenty of LEDs to work with. The Low density strip contains 30 LEDs per meter, giving us a total of 90 RBG LEDs. You can choose to use a medium/high density, but be aware there are hardware limitations in Circuit Python.

![led_strips_neopixel-reel.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/767/medium640/led_strips_neopixel-reel.jpg?1523030090)

## Prerequisite Guides

If you're new to Circuit Python, NeoPixels and Soldering, take a moment to walk through the following guides to get you started.

- [Welcome to Circuit Python](../../../welcome-to-circuitpython?view=all)
- [Adafruit NeoPixel Uber Guide](../../../adafruit-neopixel-uberguide?view=all)
- [Adafruit's Guide to Excellent Soldering](../../../adafruit-guide-excellent-soldering?view=all)

![](https://cdn-learn.adafruit.com/assets/assets/000/052/720/medium800/led_strips_parts-2.jpg?1522768991)

## Electronic Components

The Adafruit ItsyBitsy M0 and NeoPixel strip are the main electronic components used in this project.

### Part: Adafruit ItsyBitsy M0
quantity: 1
Adafruit ItsyBitsy M0 Express - for CircuitPython
[Adafruit ItsyBitsy M0](https://www.adafruit.com/product/3727)

### Part: Vibration Sensor Switch
quantity: 1
Medium sensitivity non-directional vibration
[Vibration Sensor Switch](https://www.adafruit.com/product/2384)

### Part: Adafruit NeoPixel Digital RGB LED Strip
quantity: 1
3 meters - White 60 LEDs per meter
[Adafruit NeoPixel Digital RGB LED Strip](https://www.adafruit.com/product/1138)

### Part: Soft Tactile Button
quantity: 1
8mm x 8mm pack of 10
[Soft Tactile Button](https://www.adafruit.com/product/3101)

### Part: USB Battery Pack
quantity: 1
4000mAh - 5V @ 1A
[USB Battery Pack](https://www.adafruit.com/product/1565)

## Supplies

Wires and some handy supplies.&nbsp;

### Part: 26AWG Wire
quantity: 1
Silicone Cover Stranded-Core Wire - 25ft
[26AWG Wire](https://www.adafruit.com/product/2517)

### Part: Solder Wire
quantity: 1
Solder Spool - 1/4 lb SAC305 RoHS lead-free / 0.031" rosin-core - 0.25 lb / 100 g
[Solder Wire](https://www.adafruit.com/product/734)

### Part: Heat Shrink Tubing
quantity: 1
Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters
[Heat Shrink Tubing](https://www.adafruit.com/product/1649)

## Cool Tools!

These help make the project a smooth building experience. You don't need them all of them, but I recommend them.

### Part: Wire Strippers
quantity: 1
Hakko Professsional Quality 20-30 AWG Wire Strippers - CSP-30-1
[Wire Strippers](https://www.adafruit.com/product/527)

### Part: Wire Cutters
quantity: 1
Flush diagonal cutters - CHP170
[Wire Cutters](https://www.adafruit.com/product/152)

### Part: Soldering Iron
quantity: 1
Adjustable 30W 110V soldering iron - XY-258 110V
[Soldering Iron](https://www.adafruit.com/product/180)

### Part: Panavise
quantity: 1
Panavise Jr. - PV-201
[Panavise](https://www.adafruit.com/product/151)

### Part: Helping Third Hands
quantity: 1
Helping Third Hand Magnifier W/Magnifying Glass Tool - MZ101
[Helping Third Hands](https://www.adafruit.com/product/291)

### Part: Ultimaker 2+
quantity: 1
3D Printer
[Ultimaker 2+](https://www.adafruit.com/product/2673)

![](https://cdn-learn.adafruit.com/assets/assets/000/052/766/medium800/led_strips_hero-green-light.jpg?1523029780)

# LED Trampoline

## Circuit Diagram

## Circuit&nbsp;Diagram

This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference. The vibration switch wasn't available in Fritzing so instead we have a tilt switch – These are basically the same pin layout.

![](https://cdn-learn.adafruit.com/assets/assets/000/052/662/medium800/led_strips_circuit-diagram.png?1522610774)

Info: 

## Wired Connections

Ground will be shared by the neopixel strip, vibration switch and the button. The circuit will be powered via USB battery bank.

- Pin 10 from ItsyBitsy M0 to DIN on NeoPixel Strip
- Pin 9 from ItsyBitsy M0 to Vibration Switch
- Pin 7 from ItsyBitsy M0 to Button Switch
- Pin USB from ItsyBitsy M0 to +5V on NeoPixel Strip
- Ground from ItsyBitsy M0 to NeoPixel strip, vibration switch and button

[Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts)
[circuit_diagram.fzz](https://cdn-learn.adafruit.com/assets/assets/000/052/907/original/circuit_diagram.fzz?1523367217)
# LED Trampoline

## Software

![](https://cdn-learn.adafruit.com/assets/assets/000/052/780/medium800/led_strips_bread-proto-banner.jpg?1523035949)

Now we're going to take a look at the code behind our LED trampoline light show!

Copy the following file to your Itsy Bitsy CIRCUITPY drive, and rename it to code.py. Or copy and paste it into your current code.py, replacing its current contents. Save your file, and you're ready to go!

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

Info: 

## Setup

The first thing we do after importing the libraries we'll be using is set up the pins so our code knows where to look for the switches and LEDs.

Then we set the `pixel_count = 40`. This project uses 80 pixels total. However, there were hardware limitations with running 80 pixels. So, we've cut the strip into two, and attached the two strips of 40 to the same pin. Since they're attached to the same pin, the code doesn't know the difference and sends the same data to both strips. That's why the total is set to 40!

We also set the `chase_color_duration = 3` which determines how long in seconds each color lasts in the color chase mode. You can change this number if you'd like your colors to last a longer or shorter time.

Next we setup our switches, and the red LED which we will be using as a status light for mode changes.

Next up is a list of color variables. We have a lot of color in this project! Since we reuse the colors multiple times, we've created a variable for each color so we can call it by a name instead of the `(R, G, B)` color tuple.

## Helper Functions

Then we have a few functions that we'll be using. `cycle_sequence` is a helper function we use with generators. You can learn about how generators work in the [Generate Your Colors section of the Hacking Ikea Lamps with CPX guide](../../../../hacking-ikea-lamps-with-circuit-playground-express/generate-your-colors). In the LED Trampoline project, we're using a generator with our Flash and Fade mode. The fade takes a certain amount of time, and it's possible you could try to jump faster than the fade animation takes. In this case, the generator allows for the fade animation to be interrupted and a new color fade to begin.

We have `fade_control` which is what handles our flash and fade. Each time we call it, it starts with the brightness at 100 percent and then steps down 15 times to 0. This is how the fade works!

The `sparkle_code` handles the Sparkle mode. It sets a random pixel to a color and then sets one next to it to a faded version of that color. That is how we achieve a sparkle effect. This continues and once they're all full, will continue to randomly overwrite lit pixels. The sparkle code is super fast! This means that each time you jump, you'll trigger more than one sparkle at a time. It looks amazing!

We set `fade = fade_control()` so we can later call `fade_control` using `fade`.

Next we setup the list of colors we're going to use in Flash and Fade. `flash_color` uses the `cycle_sequence` generator to go through the list of colors and start over endlessly. This way you can jump as long as you want on the Flash and Fade mode and the colors keep right on changing!

## Color Setup

We set the colors for the Sparkle mode using `sparkle_color_list` and the six special colors chosen for the Sparkle mode. They're slightly different than the main color list because these colors look especially great with the way the sparkle\_code works. You can feel free to change these to any of the other colors or add more if you like!

`sparkle_color_index` is used to tell the code to start with the first color on the list. Remember, in CircuitPython, counting begins with 0, so 0 represents the first color in the list!

We set the colors for the Color Chase mode using `chase_color_list` and six of our color variables. You could add to this and change which colors are used if you like!

`chase_color_index` is the same as the sparkle version - it tells the code to start with the first color on the list.

The next few lines setup the chase color changing. We use `time.monotonic()` because we'd like to be able to set the amount of time the chase mode is a certain color, but we want the code to continue waiting in case we decide to jump or change modes. `time.monotonic()` is called non-blocking, meaning the code is not stopped by it. Learn more about non-blocking code in the [Passing Time section of the Hacking Ikea Lamps with CPX guide](../../../../hacking-ikea-lamps-with-circuit-playground-express/passing-time).

We set `mode = 0`. This tells the code to begin with the first mode. We'll start with Flash and Fade! We `print("Mode:", mode)` which is "Mode:" and the current mode, which is `0` before we start. So if you are connected to the serial console during testing, you'll see `Mode: 0`.

To use `time.monotonic()`, you always set a start time. That's the last thing we do before we start our main loop!

## `try` and `except`

`while True:` says to run the code indented beneath it forever.

The first and last thing inside our `while True:` loop, are `try:` and `except MemoryError: pass`. This is due to a very rare situation where the code returns a memory error and stops.

`try:` says to first try running all of the code indented under the `try`. If there is an error, the code moves to the `except:` and completes the code underneath. In this case it will `pass` which says to just keep right on going and start again with the try.

Since this project is meant to be attached to a trampoline and continue to run while you have fun jumping, we've included this `try` and `except` code so if it does run into that problem, it will keep going. This way you can keep on jumping even if the code runs into this problem! Otherwise, you'd have to reset the board. And what's the fun in that!

## Main Loop

First, we make it so the button must be pressed and released before the code switches modes. This way you cannot accidentally skip modes by holding down the button too long.

Each time the mode is switched, it turns off the LEDs so you're starting your new mode with a clean slate. It blinks the little red LED, which can't be seen once the project is assembled, but is super handy when you're testing the project while still attached to your computer. Each time the button is pressed and released, it increases the mode by 1. Once that number is greater than 2 (remember we start counting at 0, so 2 is the third mode!) it resets to 0. This way we cycle through each of the three modes and then begin again with the first! Each time it `prints` the mode to the serial output, which you can see if you're connected while testing the project on your computer.

## Flash and Fade Mode

If the mode is 0, we start the Flash and Fade code. Here we have another `try` and `except`. This is due to the way that the `flash_control` generator works. `flash_control` begins at 100 percent and ends at 0, and would normally simply stop here as it has iterated through all possible values. We want it to keep going so we can jump again, flash again and fade again. So, we've included `except StopIteration: pass` to keep the Flash and Fade mode moving.

Inside our `try`, we have `if not vibration_switch.value:`. The vibration switch defaults to "True" when not triggered, and becomes "False" when triggered. So, if we're looking to do a thing when the switch is triggered, we want to refer to when it is `False` which is done by using `if not`. This way, when we jump, we trigger the next set of events to happen. We `print` that the mode is activated! We call `fade`, we `fill` the pixels with the next color from our `flash_color` list, and we call `pixels.show()` which tells the pixels to light up with whatever we just set. In this case, it will flash the color and fade to black. Then we call `next(fade)` which tells the fade\_control to start again.

## Sparkle Mode

If the mode is 1 and we've triggered the vibration switch, then we start the Sparkle code. We `print` the mode is activated!

When you change modes in the middle of the Flash and Fade code, the brightness stays at the level it was at the exact moment that you switched modes. This means you could switch modes when the brightness is set to 0. If that happened, you'd get no sparkles at all! That's no good. So, we set `pixel.brightness = 1` to set it back to 100%, so you get all the sparkle goodness regardless of where the brightness was when you switched.

The next line tells the sparkle code that `sparkle_color_list` should cycle through all the colors. And the last line says run the sparkle code repeatedly, cycling through the list of colors as you jump, and to keep doing this until you change modes!

## Color Chase Mode

If the mode is 2 and we've triggered the vibration switch, we start the Color Chase code. We `print` the mode is activated! And, for the same reason as in Sparkle mode, we set the brightness to 100%.

The next bit is the core of the Chase mode. This is the chase code. This tells the strips to light up every 4 LEDs with 4 off between. Then it says, each time the switch is triggered, move the groups of lit LEDs towards the middle. In our case, since we've split our LED strips into 2, the chase will happen in two parts, one on each half, moving towards the middle of that half. They meet and meld in the middle!

The last section is what tells the chase code to change colors. We told it at the beginning to change colors every 3 seconds. So, every time 3 seconds passes, chase mode changes color. It forever cycles through the list of colors we provided during color setup. This happens whether or not you're jumping, because it's entirely based on time!

And that's it!

![](https://cdn-learn.adafruit.com/assets/assets/000/052/781/medium800/led_strips_itsybitsy-dock-code.jpg?1523035985)

## MicroUSB Dock for Dev Boards

Like the dock in this photo? You can 3D Print and build your own!&nbsp;

[3D Printed MicroUSB Dock](https://learn.adafruit.com/micro-usb-dock-for-circuit-playground?view=all)
# LED Trampoline

## 3D Printing

## What If I Don't Have A 3D Printer?

Not to worry! You can use a 3D printing service such as&nbsp;[3DHubs](https://www.3dhubs.com/)&nbsp;or&nbsp;[MakeXYZ](https://www.makexyz.com/)&nbsp;to have a local 3D printer operator 3D print and ship you parts to you. This is a great way to get your&nbsp;parts 3D printed by local makers. You could also try checking out your local Library or search for a Maker Space.

![](https://cdn-learn.adafruit.com/assets/assets/000/052/732/medium800/led_strips_3d-parts-2.jpg?1522807957)

## Project Enclosure Parts

The case and cover snap fit together. The ItsyBitsy board clips into the case with the microUSB facing the smaller opening. The push button is fitted over the post. The 3D printed button cover is fitted over the rubber part of the push button. The clip is press fitted into the back of the case.

![](https://cdn-learn.adafruit.com/assets/assets/000/052/779/medium800/led_strips_cura-case-toolpaths.jpg?1523035858)

## Slice Settings

These parts have been tested and 3D printed on an Ultimaker 2+ and 3 using PLA filament. The parts were sliced using CURA 3.x with the following slice settings.

- 220C extruder temp
- 65c bed temp
- 0.2 layer height
- 0.38 line width
- 2 Wall Line Count – 0.4 nozzle
- 20% infill
- 70mm/s print speed

![led_strips_cura-slice.png](https://cdn-learn.adafruit.com/assets/assets/000/052/711/medium640/led_strips_cura-slice.png?1522716842)

## 3D Printed Parts

All of the parts are 3D printed with FDM type 3D printers using various colored filaments. All of the parts are separated into pieces to make 3D printing easier. Assembly is pretty easy and&nbsp;straight forward. Use the links below to&nbsp;download the STLs files.

[Download STLs on Thingiverse](https://www.thingiverse.com/thing:2852674)
[Download STLs on Pinshape](https://pinshape.com/items/44543-3d-printed-led-trampoline-neopixels-and-circuitpython)
[Download STLs on Youmagine](https://www.youmagine.com/designs/led-trampoline-neopixels-and-circuitpython)
## Design Source Files

The enclosure assembly was designed in Fusion 360.&nbsp;This can be downloaded in different formats like STEP, SAT and more. Electronic components like the board, displays, connectors and more can be downloaded from our [Fusion 360 CAD parts github repo](https://github.com/adafruit/Adafruit_CAD_Parts).

[Trampoline Fusion 360 Design](https://a360.co/2Ej5A8Y)
[ItsyBitsy Case Fusion 360 Design](https://a360.co/2GFjT9G)
[Adafruit CAD Parts Github](https://github.com/adafruit/Adafruit_CAD_Parts)
# LED Trampoline

## Vibration Switch

## Wires for Vibration Sensor

We'll need two long wires for connecting the vibration sensor to the ItsyBitsy board. Mine were about 23cm (9in) in length. I suggest using different colored wires to help tell the connections apart.

![led_strips_wire-vibration-23c-9in.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/664/medium640/led_strips_wire-vibration-23c-9in.jpg?1522616597)

## Prep Wires

Using wire strippers, remove a bit of insulation from the tips of each wire. Since I'm using 30AWG silicone covered wires, they're stranded wires so I suggest tinning the tips with a bit of solder. This will help prevent them from fraying when attaching them to pins and other wires. I used a third helping hand to keep the wires steady, which is super helpful when soldering.&nbsp;

## Heat Shrink Tubing

I used a couple of pieces of heat shrink tubing to keep the two wires bundled together.&nbsp; Since this project will use a quite a few wired connections, keeping them nice and tidy is super useful.&nbsp;&nbsp;

![led_strips_wires-prep.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/668/medium640/led_strips_wires-prep.jpg?1522616861)

## Prevent Shorts

Before soldering the wires to the leads of the vibration sensor, add a piece of heat shrink tubing to each wire. This will prevent the two leads from shorting when assembling.

![led_strips_wires-tubing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/672/medium640/led_strips_wires-tubing.jpg?1522617128)

## Connect Wires to Vibration Sensor

The two leads on the vibration sensor are long so we can cut them shorter. To make it easier to attach the wires to the leads, add a bit of solder. Be sure to add pieces of heat shrink tubing before soldering the wires to the leads. I secured the vibration sensor to a set of third helping hands to keep it steady while soldering the connections.

## Insulate Exposed Leads

Those extra pieces of heat shrink tubing can slide over the exposed leads and cover them up so they don't accidentally short. I like to use a lighter to heat up the tubing.

![led_strips_vib-tubing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/673/medium640/led_strips_vib-tubing.jpg?1522678028)

## More Heat Shrink

While prototyping the project, I flexed the leads so much that they ripped out of the capsule. So, to avoid damaging the leads I suggest heat shrinking the whole sensor. This way, pulling on the wires won't stress the leads. If you don't have the right size of tubing, a dab of hot glue will be suffice.

![led_strips_vib-wired.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/674/medium640/led_strips_vib-wired.jpg?1522678068)

# LED Trampoline

## Button

## Wires for Button

We'll need two pieces of wire to connect the button the ItsyBitsy board. These can be a bit short since the button will be mounted close to the ItsyBitsy. I made mine about 2cm (0.7") in length. I used [30AWG silicone covered wires](https://www.adafruit.com/product/2051) for this because they're thinner and will need to be flexed quite a bit to install into the case.&nbsp;

![led_strips_button-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/675/medium640/led_strips_button-wires.jpg?1522678145)

## Wire Up Push Button

Now we can attached the wires to the leads on the button. The wires will need to be soldered to the correct pins, so take note of which side they're connected. The polarity doesn't important so it won't matter which wires goes to ground or input on the ItsyBitsy board. There's four pins and a set of two have linked continuity. The two pins on the side of the body are normally open, while the further apart ones are linked. If you're not sure which leads to use, use a [multimeter](https://www.adafruit.com/product/850) set to the continuity mode to see which leads are electrically linked.&nbsp;

## Heat Shrink

I added a piece of heat shrink tubing to keep the two wires together. I didn't need to insulate the exposed pins because they are held mechanically and won't intersect when installing into the case.

# LED Trampoline

## Perma-Proto

## Perma-Proto PCB

There's several wires in the build that will need to connect to the USB (voltage) and ground (G) pins on the ItsyBitsy board. I used a piece perma-proto PCB to extend the voltage and ground pins on the ItsyBitsy board. There's three voltage wires and five ground wires needed. I used a 2x6 piece, a little extra for good measure. To cut the PCB, I used a Dremel rotary tool with a thin cut wheel. I suggest cutting in a well ventilated area and use a dust mask and safety glasses. I used a [Panavise](https://www.adafruit.com/product/151) to hold the PCB steady.

![led_strips_perma-pcb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/679/medium640/led_strips_perma-pcb.jpg?1522678333)

## Wire Perma-Proto PCB

One set of voltage and ground pins will need to be connected to the ItsyBitsy board. We'll need two pieces of wire. I used [26AWG silicone covered wires](https://www.adafruit.com/product/1970) here to provide the NeoPixel strips with sufficient current. To keep the PCB sturdy while soldering, I used a pair of third helping hands.&nbsp;

# LED Trampoline

## JST Plugs

## 3-Pin JST Plug & Receptacle

I used these [3-pin JST cables](https://www.adafruit.com/product/1663) to connect the NeoPixels to the ItsyBitsy board. These made it easy to disconnect the board from the strips. I found this really useful because the NeoPixel strips will be attached to the trampoline. This allows me to remove the ItsyBitsy board from the assembly when I needed to change or update the code.

![led_strips_3pin-jst-connecotrs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/684/medium640/led_strips_3pin-jst-connecotrs.jpg?1522678859)

## Prep Wires

I started by trimming the wires of the male connectors short because they're a bit longer than needed. Then, I used wire strippers to remove a bit of insulation for each wire. I tinned the exposed strands of wire with a bit of solder. I found these wires to be pretty stiff. They're 22AWG sized and difficult to attach to the pins on the ItsyBitsy board. To give them a bit more flex, I extended the wires with 26AWG silicone covered wires. The different colors are nice and help tell the connections apart.

## Extended JST Plugs

I soldered the pieces of 26AWG wire and insulated the exposed connections with heat shrink tubing. I made sure to keep the colored wires consistent across the two male connectors. It's very important to keep track of the connections to avoid shorting or damaging the neopixel strips.

![led_strips_jst-males.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/689/medium640/led_strips_jst-males.jpg?1522679038)

## Female JST Receptacles

The female receptacles will be soldered directly to the pads on the NeoPixel strips and does not need to be extended with flexible wires. I found the length of wires a bit too long so I cut them a bit shorter. Keep each wire tinned with a bit of solder, it'll make it easier to attach them to the pads on the LED strips later. I also added some bits of heat shrink tubing!

![led_strips_jst-females.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/690/medium640/led_strips_jst-females.jpg?1522679070)

# LED Trampoline

## NeoPixels

## Count and Cut NeoPixel Strip

The 3 meter long NeoPixel strip includes 90 LEDs in total. I wrapped the full length around the trampoline (36" in diameter) and found that I only need 80 LEDs. The remaining ten pixels can be cut off using a pair of scissors. Because of the hardware limitations with CircuitPython, we found running the code with 90 NeoPixels was slow and delayed. To combat this, we can cut the strip in half, so each contains just 40 pixels each. Then, in the code we reduced the pixel count to just 40.

![led_strips_strip-count.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/714/medium640/led_strips_strip-count.jpg?1522763039)

## Wire JST to NeoPixel Strip

With our two strips of 40 NeoPixels (80 in total) we can solder the JST receptacles to the pads. It's very important to note which wire will be attached to the **5V** , **GND** and **DIN** pads. I connected the male JST plug to the female receptacles and followed the colored wires, going red to 5V, black to GND and yellow to DIN. This way we can keep the connections across the two consistent. Double check the wiring before soldering the wires to the pads on the NeoPixel strips. I found tinning the pads with a bit of solder first makes it easier to attach the wires.

# LED Trampoline

## ItsyBitsy M0

## Connectors

Before we solder all of the wires to the ItsyBitsy board, it's a good idea double check all of our wiring. Planning ahead allows you to catch any mistakes we might encounter. Take this opportunity to add more heat shrink!

![led_strips_connectors.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/718/medium640/led_strips_connectors.jpg?1522763260)

## Wire Perma-Proto

I suggest starting with getting all of the power and ground connections soldered to the piece of perma-proto PCB. I secured it to panavise to keep it in place while soldering. The board can get a bit cluttered so take your time and orient the PCB so your hands don't get in the way while soldering. You'll want to double check your work and ensure the connections are in the right places. The perma-proto PCB has high quality through-holes so it's ok if you need to rework any of the pins.

## Wire ItsyBitsy

Now it's time to wire up the ItsyBitsy board. I started with the most difficult connections being the **Data Input** for the NeoPixel strips. Because these connections have a thicker 26AWG wires, it's hard to share a single pin. I used a pair of flush snips to thin out the wires so that I could insert them both into **pin #10**. You'll want to double check your work to ensure both connections are solid. Next, we can solder the button to **Pin #9** and the vibration sensor to **Pin #7**.

## Final Wiring

The last wiring we need to do is the ground and voltage wires from the Perma-Proto PCB. The black wire goes into the G labeled pin (it's ground) and the red wire goes to the USB pin (this is voltage from USB power like a battery or USB hub.). Once everything is wired, you'll want to double check your work, again making sure the connections are solid and in the right pins. The final circuit looks a bit cluttered so we can orient the wires so we can handle the board. This will make it more manageable once we fit everything into the 3D printed case.&nbsp;

# LED Trampoline

## Case Assembly

## Install Case

Orient the ItsyBitsy PCB so the microUSB connector is facing the small opening on the side of the 3D printed case. Place the board over the case and press it down into it into the case. Three walls should clip onto the edges of the PCB. Depending on how tight the tolerances are, you may need to firmly press down on the PCB.

The push button can be fitted into the square post with the leads on the sides. It should have a snug fit and hold in place. Orient the wires so they're routed along the outside of the post. Be careful not to bend the leads.

You'll want to position the wiring along the inside of the case so they're neatly routed. The Perma-Proto PCB should have enough room to fit in between the ItsyBitsy board and side walls of the case. The two JST plugs and vibration sensor wiring should be fitted over the opening.

## Install Button and Cover

Place the 3D printed button actuator over the rubber piece of the switch. Orient the cover so the button cutout is lined up with button. Then, bring the two parts together and firmly press them together to snap it shut. You should get a nice click. If you can't get the cover to fully close, you may need to adjust the PCB or wiring.

## Test NeoPixel Strips

Now we can test out the NeoPixel strips. You'll want to double check the wires are soldered to the right connections before powering on the circuit. Pin #10 ought to be wired to the DATA INPUT, not the output, as indicated on the strip itself with a little arrow icon pointing away from the pads. If everything checks out, plug in a USB battery to the ItsyBitsy board. You can shake the vibration sensor to trigger the NeoPixel animations. Use the button to cycle between 3 different modes.

![led_strips_strip-test-green.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/708/medium640/led_strips_strip-test-green.jpg?1522679770)

# LED Trampoline

## Trampoline Setup

## Remove Padding

The trampoline has a protective padding that covers the framing and elastic bands. We'll need to remove it in order to attach the clips and hang the NeoPixel strips. Start by stretching the elastic lining and uncover the padding. You'll notice holes in various spots that accommodate for the threaded posts. These are for attaching the legs to the framing.

![led_strips_remove-padding.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/774/medium640/led_strips_remove-padding.jpg?1523032983)

## Installing NeoPixel Strips

Before we install the strips, we need to plan where the connections are going to be. Ideally, we want them to be closed to one of the legs of the trampoline because that's where we're going to attach the enclosure. We have two LED strips to install, so we'll need each to go in the opposite direction.&nbsp;

## Threading NeoPixel Strips

The NeoPixel strips come with a protective silicone sheathing that is grippy. This introduces friction when the strips rub against the framing. Start by threading the end of the strip through the elastic strap and slowly inch it along the framing. Using both hands, guide both ends of the strip through the elastic straps until the whole strip is covering the framing. Repeat the process for the second strip, but going in the opposite direction. Once both strips are in place, attach the clips across the framing and hang the strip making sure not to cover up the LEDs.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/052/769/medium800/led_strips_install-vib-sensor.jpg?1523032539)

## Attaching the Vibration Sensor

Finding the best location for the vibration sensor requires a bit of play testing. For me, I mounted the sensor inside one of the elastic bands. This way it'll easily get triggered whenever the bed is slightly vibrated. I found the sensor to come out after a handful of jumps so I added some mounting tack to hold it in place. I could have also used zip ties, gaffers tape, hot glue or even sewed it onto the strap. I originally embedded the sensor in the enclosure but found it difficult to trigger. It might also work mounted to the framing or one of the legs. Experiment with different spots and methods of securing it to the trampoline.

## Clip Case to Trampoline

The clip attached to the leg closest to the LED strip connectors. I oriented the case so that the microUSB is facing the bottom – This way the LED wiring isn't twisting or bending. The clip should have a tight fit and grasp the leg snuggly.&nbsp;

![led_strips_clip-case-leg.jpg](https://cdn-learn.adafruit.com/assets/assets/000/052/775/medium640/led_strips_clip-case-leg.jpg?1523033125)


## Featured Products

### Adafruit ItsyBitsy M0 Express - for CircuitPython & Arduino IDE

[Adafruit ItsyBitsy M0 Express - for CircuitPython & Arduino IDE](https://www.adafruit.com/product/3727)
What's smaller than a Feather but larger than a Trinket? It's an **Adafruit ItsyBitsy M0 Express**! Small, powerful, with a rockin' ATSAMD21 Cortex M0 processor running at 48 MHz - this microcontroller board is perfect when you want something very compact, but still...

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

[Adafruit NeoPixel Digital RGB LED Strip - White 30 LED](https://www.adafruit.com/product/1376)
You thought it couldn't get better than [our world-famous 32-LED-per-meter Digital LED strip](http://adafruit.com/products/306) but we will prove you wrong! These NeoPixel strips have 30 digitally-addressable pixel LEDs per meter and are very affordable and are only 12.5 mm...

In Stock
[Buy Now](https://www.adafruit.com/product/1376)
[Related Guides to the Product](https://learn.adafruit.com/products/1376/guides)
### Fast Vibration Sensor Switch (Easy to trigger)

[Fast Vibration Sensor Switch (Easy to trigger)](https://www.adafruit.com/product/1766)
The "poor man's" accelerometer/motion sensor! These spring-vibration switches are **high sensitivity** non-directional vibration induced trigger switches. Inside is a very soft spring coiled around a long metal pin. When the switch is moved, the spring touches the...

In Stock
[Buy Now](https://www.adafruit.com/product/1766)
[Related Guides to the Product](https://learn.adafruit.com/products/1766/guides)
### Soft Tactile Button (8mm) x 10

[Soft Tactile Button (8mm) x 10](https://www.adafruit.com/product/3101)
Put your project in stealth mode with these silent **Soft Tactile Switch Buttons**. **&nbsp;**

**T** actile switches are standard input "buttons" on electronic projects. These work best in a PCB but <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/3101)
[Related Guides to the Product](https://learn.adafruit.com/products/3101/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

In Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/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

- [Introducing ItsyBitsy M0 Express](https://learn.adafruit.com/introducing-itsy-bitsy-m0.md)
- [Using NeoPixels with Netduino Plus 2](https://learn.adafruit.com/using-neopixels-with-netduino.md)
- [Busy Box Interruption Sign](https://learn.adafruit.com/busy-box-interruption-sign.md)
- [Owl IR TV Remote](https://learn.adafruit.com/owl-ir-tv-remote.md)
- [Larson Scanner Shades (Trinket-Powered NeoPixel LED Strip Glasses)](https://learn.adafruit.com/larson-scanner-shades.md)
- [Citi Bike Helmet](https://learn.adafruit.com/citi-bike-helmet.md)
- [A NeoPixel Pomodoro Timer](https://learn.adafruit.com/a-neopixel-pomodoro-timer.md)
- [NeoPixels with MakeCode](https://learn.adafruit.com/neopixels-with-makecode.md)
- [CircuitPython Essentials](https://learn.adafruit.com/circuitpython-essentials.md)
- [CLUE Vertical Garden Weather Visualizer](https://learn.adafruit.com/clue-vertical-garden-weather-visualizer.md)
- [Festive Feather Holiday Lights](https://learn.adafruit.com/festive-feather-holiday-lights.md)
- [NeoPixel LED Necklace Insert with USB Charging](https://learn.adafruit.com/neopixel-led-necklace-insert-with-usb-charging.md)
- [MakeCode Maker](https://learn.adafruit.com/makecode-maker.md)
- [Flora+NeoPixel LED Skateboard Upgrade](https://learn.adafruit.com/flora-neopixel-led-skateboard-upgrade.md)
- [Storage humidity and temperature monitor](https://learn.adafruit.com/storage-humidity-and-temperature-monitor.md)
