# Cyberpunk Spikes

## Overview

http://www.youtube.com/watch?v=xZWZjGvfP4I

![](https://cdn-learn.adafruit.com/assets/assets/000/014/836/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-overtheshoulder.jpg?1394021800)

Info: 

Before you get started, follow the&nbsp;[Gemma M0 guide](../../../../adafruit-gemma-m0/circuitpython-digital-in-out?view=all)&nbsp;or the&nbsp;[Classic Introducing&nbsp;GEMMA guide](../../../../introducing-gemma/introduction)&nbsp;

Make your own flexible, spiky, glowing accessory using NeoPixel strip diffused by NinjaFlex flexible 3D printing filament! Magnets let you attach the spikes to anything in your wardrobe. The soft flexible enclosure holds GEMMA, the tiny microcontroller that animates the LEDs, and a rechargeable lipoly battery.  
  
For this project you will need:

- [Gemma M0](https://www.adafruit.com/product/3501)[&nbsp;or&nbsp;](http://www.adafruit.com/products/1138 "Link: http://www.adafruit.com/products/1138")[GEMMA v2 wearable microcontroller](http://www.adafruit.com/products/1222 "Link: http://www.adafruit.com/products/1222")&nbsp;(the [Trinket M0](https://www.adafruit.com/product/3500) would also work)
- [60 LED per meter NeoPixel strip (1 meter)](http://www.adafruit.com/products/1138 "Link: http://www.adafruit.com/products/1138")
- [NinjaFlex Snow White flexble 3D printing filament](http://www.adafruit.com/products/1691 "Link: http://www.adafruit.com/products/1691")
- [slide switch](http://www.adafruit.com/products/805)
- [JST extension](http://www.adafruit.com/products/1131)
- [500mAh lipoly battery](http://www.adafruit.com/products/1578)
- [six rare earth magnets](http://www.adafruit.com/products/9)
- safety pins or needle and thread
- Permatex 66B silicone adhesive

![](https://cdn-learn.adafruit.com/assets/assets/000/014/838/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-hairflip.jpg?1394022275)

It's easy to wear your spikes around your collar, over your shoulder, in your hair, on the strap of a bag, and even in your hair. How will you wear it? We'd love to see your versions on our [weekly show and tell on Google+](http://www.youtube.com/playlist?list=PL7E1FAA9E63A32FDC)!

![](https://cdn-learn.adafruit.com/assets/assets/000/014/784/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-epaulet.jpg?1394006652)

Portaits by Andrew Tingle.

# Cyberpunk Spikes

## Download and 3D Print

![](https://cdn-learn.adafruit.com/assets/assets/000/014/761/medium800/3d_printing_cyberpunk-spikes-gemma-00.jpg?1393979970)

We designed two styles of spike strip-- one with regular round spikes and one crystal-inspired statement piece. Download whichever spikes you like and print in NinjaFlex filament at 225 degrees with a non-heated build plate. For more tips on working with NinjaFlex, check out our [NinjaFlex guide](http://learn.adafruit.com/3d-printing-with-ninjaflex).

[Download 3D spike files on Thingiverse](http://www.thingiverse.com/thing:262494/)
![](https://cdn-learn.adafruit.com/assets/assets/000/014/888/medium800/3d_printing_gemma500case_preview_featured.jpg?1394040688)

Also print the two pieces of the flexible enclosure for the GEMMA and battery. Since it's printed in NinjaFlex, the enclosure is soft and flexible, yet firm enough to protect your components. The enclosure shape includes tabs for pinning or sewing to your garment.

[Dowload enclosure files on Thingiverse](http://www.thingiverse.com/thing:262522)
# Cyberpunk Spikes

## Prepare NeoPixel Strip

Prepare the input end of your NeoPixel strip by tinning the pads with solder. The strip won't work if you solder wires to the wrong end, so be sure the arrows on the PCB point away from the end you're wiring.  
  
Solder three stranded wires, about eight inches long each, to the tinned pads of the NeoPixel strip. To help avoid the solder joints from being too cramped, solder the center pad's wire on the reverse side of the PCB (two on top, one on bottom), as shown.  
  
Wrap three rare earth magnets in tape to prevent short circuits, and slide them into the NeoPixel strip sheathing, on the underside of the PCB. Our spike strip is 16 pixels long, and we used three magnets evenly spaced (one at each end and one in the center).

![3d_printing_cyberpunk-spikes-gemma-00a.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/762/medium640/3d_printing_cyberpunk-spikes-gemma-00a.jpg?1393983612)

![3d_printing_cyberpunk-spikes-gemma-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/764/medium640/3d_printing_cyberpunk-spikes-gemma-01.jpg?1393983808)

![3d_printing_cyberpunk-spikes-gemma-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/765/medium640/3d_printing_cyberpunk-spikes-gemma-02.jpg?1393983866)

![3d_printing_cyberpunk-spikes-gemma-03.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/766/medium640/3d_printing_cyberpunk-spikes-gemma-03.jpg?1393983919)

Prepare a protected work surface in an area with good ventilation.  
  
Use Permatex 66B silicone adhesive to affix the 3D printed spikes to the NeoPixel strip. Apply both to the strip's silicone sheathing and the NinjaFlex strip of spikes, using a toothpick to spread it around if necessary.  
  
Squish a bit of silicone adhesive into the ends of the NeoPixel strip sheathing to provide water resistance and strain relief.  
  
Allow adhesive to dry overnight.

![3d_printing_cyberpunk-spikes-gemma-05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/767/medium640/3d_printing_cyberpunk-spikes-gemma-05.jpg?1393983978)

![3d_printing_cyberpunk-spikes-gemma-06.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/768/medium640/3d_printing_cyberpunk-spikes-gemma-06.jpg?1393984034)

![3d_printing_cyberpunk-spikes-gemma-06a.png](https://cdn-learn.adafruit.com/assets/assets/000/014/769/medium640/3d_printing_cyberpunk-spikes-gemma-06a.png?1393990981)

![3d_printing_cyberpunk-spikes-gemma-07.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/893/medium640/3d_printing_cyberpunk-spikes-gemma-07.jpg?1394042703)

# Cyberpunk Spikes

## Assemble Circuit

https://youtu.be/oUuGXWMr3sE

![](https://cdn-learn.adafruit.com/assets/assets/000/047/429/medium800/3d_printing_Cyberpunk_Spikes.png?1508530854)

Info: 

Route your NeoPixel strip's wires through the hole at the top of the enclosure, and solder them up to GEMMA:  
NeoPixel GND -\> GEMMA GND  
NeoPixel + -\> GEMMA Vout  
NeoPixel signal -\> GEMMA D1  
  
Seat GEMMA into the round outline inside the enclosure, with the USB port facing its opening at the bottom end of the enclosure.

![3d_printing_cyberpunk-spikes-gemma-16.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/878/medium640/3d_printing_cyberpunk-spikes-gemma-16.jpg?1394031916)

![3d_printing_cyberpunk-spikes-gemma-09.png](https://cdn-learn.adafruit.com/assets/assets/000/014/879/medium640/3d_printing_cyberpunk-spikes-gemma-09.png?1394031969)

![3d_printing_cyberpunk-spikes-gemma-18.jpg](https://cdn-learn.adafruit.com/assets/assets/000/014/880/medium640/3d_printing_cyberpunk-spikes-gemma-18.jpg?1394032008)

Use a JST extension and slide switch to make this tiny adapter. The slide switch fits into the opening in the enclosure and now you can easily power up your circuit while still making it easy to disconnect the battery for recharging.

![3d_printing_cyberpunk-spikes-gemma-10.png](https://cdn-learn.adafruit.com/assets/assets/000/014/772/medium640/3d_printing_cyberpunk-spikes-gemma-10.png?1393992130)

![3d_printing_cyberpunk-spikes-gemma-11.png](https://cdn-learn.adafruit.com/assets/assets/000/014/773/medium640/3d_printing_cyberpunk-spikes-gemma-11.png?1393992164)

![3d_printing_cyberpunk-spikes-gemma-12.png](https://cdn-learn.adafruit.com/assets/assets/000/014/774/medium640/3d_printing_cyberpunk-spikes-gemma-12.png?1393992202)

Fit everything neatly in the enclosure and press on the lid.

![3d_printing_cyberpunk-spikes-gemma-14.png](https://cdn-learn.adafruit.com/assets/assets/000/014/776/medium640/3d_printing_cyberpunk-spikes-gemma-14.png?1393992722)

# Cyberpunk Spikes

## Arduino Code

Info: 

[Click to Download the NeoPixel Library](https://github.com/adafruit/Adafruit_NeoPixel/archive/master.zip)
First test your NeoPixel strip using the strandtest sketch after having downloaded the NeoPixel library for your GEMMA-modded Arduino. Did that sound like gibberish to you? Read the [Intoducing GEMMA](http://learn.adafruit.com/introducing-gemma "Link: http://learn.adafruit.com/introducing-gemma") and [NeoPixel guides](http://learn.adafruit.com/adafruit-neopixel-uberguide).

Installing Arduino libraries is a frequent stumbling block. If this is your first time, or simply needing a refresher, please read the&nbsp;[All About Arduino Libraries](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use)&nbsp;tutorial.[![](../../../../assets/divider_icon-45a76f14a0234c47f43488c60c9d77a1701a0ff9f3a09498809a26305ce3df23.gif)](../../../../neopixel-punk-collar/3634)If the library is correctly installed (and the Arduino IDE is restarted), you should be able to navigate through the “File” rollover menus as follows:  
  
**File→Sketchbook→Libraries→Adafruit\_NeoPixel→strandtest**  
  
Connect up your NeoPixels in a solderless breadboard and use alligator clips to attach to GEMMA, referring to the circuit diagram if necessary.  
  
You’ll need to change a few lines in the code regarding the data pin (1), type of pixels (RGB vs GRB), and number of pixels (5). The resulting (and slightly simplified) code is below:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Cyberpunk_Spikes/Cyberpunk_Spikes.ino

From the&nbsp; **Tools→Board** &nbsp;menu, select&nbsp;the&nbsp;device you are using: **&nbsp;**

- **Adafruit Gemma M0**
- **Adafruit Gemma 8 MHz** &nbsp;

Connect the USB cable between the computer and your device. The original Gemma (8 MHz) need the reset button pressed on the board, then click the upload button (right arrow icon) in the Arduino IDE. You do not need to press the reset on the newer Gemma M0.

When the battery is connected, you should get a light show from the LEDs. All your pixels working? Great! You can take apart this prototype and get ready to put the pixels in the collar. Refer to the&nbsp;[NeoPixel Uberguide](../../../../adafruit-neopixel-uberguide)&nbsp;for more info.

# Cyberpunk Spikes

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/047/426/medium800/3d_printing_gemma-cp.jpg?1508459526)

 **GEMMA&nbsp;M0** &nbsp;boards can&nbsp;run&nbsp; **CircuitPython** &nbsp;— a different approach to programming compared to Arduino sketches. In fact,&nbsp; **CircuitPython comes&nbsp;factory pre-loaded on GEMMA&nbsp;M0**. If you’ve overwritten it with an Arduino sketch, or just want to learn the basics of setting up and using CircuitPython, this is explained in the&nbsp;[**Adafruit GEMMA&nbsp;M0 guide**](../../../../adafruit-gemma-m0/circuitpython-setup-1).

Info: 

Below is CircuitPython code that works&nbsp;similarly (though not exactly the same) as the Arduino sketch shown on a prior page. To use this, plug the GEMMA M0 into USB…it should show up on your computer as a small&nbsp; **flash drive** …then edit the file “ **main.py** ” with your text editor of choice. Select and copy the code below and paste it into that file,&nbsp; **entirely replacing its contents** &nbsp;(don’t mix it in with lingering bits of old code). When you save the file, the code should&nbsp; **start running almost immediately** &nbsp;(if not, see notes at the bottom of this page).

**If GEMMA M0 doesn’t show up as a&nbsp;drive, follow the GEMMA M0 guide link above to prepare the board for CircuitPython.**

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

This code requires the&nbsp; **neopixel.py** &nbsp;library. A factory-fresh board will have this already installed. If you’ve just reloaded the board with CircuitPython, create the “lib” directory and then&nbsp;[download neopixel.py from Github](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel).

[Download neopixel.py from GitHub](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel)
# Cyberpunk Spikes

## Wear it!

![](https://cdn-learn.adafruit.com/assets/assets/000/014/777/medium800/3d_printing_cyberpunk-spikes-gemma-15.png?1393992984)

You can use the included holes to stitch or pin the enclosure to your underarm or wherever you'd like to put it. For more permanent use, stitch a pocket for this enclosure on the inside of your garment and route the wires to the inside.

![](https://cdn-learn.adafruit.com/assets/assets/000/014/775/medium800/3d_printing_cyberpunk-spikes-gemma-13.jpg?1393992425)

Use a fluffy bun-maker hair accessory and tuck the enclosure under it to wear these spikes around your head!

![](https://cdn-learn.adafruit.com/assets/assets/000/014/783/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-epaulet.jpg?1394006639)

Epaulets, two styles

![](https://cdn-learn.adafruit.com/assets/assets/000/014/835/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-overtheshoulder.jpg?1394021776)

![](https://cdn-learn.adafruit.com/assets/assets/000/014/837/medium800/3d_printing_cyberpunk-spikes-gemma-adafruit-hairflip.jpg?1394022246)

Around the collar

![](https://cdn-learn.adafruit.com/assets/assets/000/014/847/medium800/3d_printing_crystal-spikestrip-noe.jpg?1394024075)

Cyber dragon, anyone?  
  
Since you sealed up the strip with adhesive, this accessory is fairly water-resistant. Turn it off and remove the battery if you get stuck in a torrential downpour!


## Related Guides

- [Sewable NeoPixels](https://learn.adafruit.com/flora-rgb-smart-pixels.md)
- [Make it Glow: NeoPixel and LED Diffusion Tips & Tricks](https://learn.adafruit.com/make-it-glow-neopixel-and-led-diffusion-tips-tricks.md)
- [Watchmen's Sister Night NeoPixel Goggles](https://learn.adafruit.com/watchmen-sister-night-circuitpython-neopixel-goggles.md)
- [Disconnected CO2 Data Logger](https://learn.adafruit.com/disconnected-co2-data-logger.md)
- [CompuCanvas 101 - Transitions](https://learn.adafruit.com/compucanvas-101.md)
- [Feather Waveform Generator in CircuitPython](https://learn.adafruit.com/waveform-generator.md)
- [JOY Controller for Adafruit Feather](https://learn.adafruit.com/joy-controller-feather.md)
- [Zelda Echoes Of Wisdom Tri Rod](https://learn.adafruit.com/zelda-tri-rod.md)
- [Circuit Playground Express Compass](https://learn.adafruit.com/circuit-playground-express-compass.md)
- [Chatty Light-Up Circuit Playground Express Mask](https://learn.adafruit.com/chatty-light-up-cpx-mask.md)
- [AdaBox 007](https://learn.adafruit.com/adabox007.md)
- [NeoPixel Spats with Gemma and MakeCode](https://learn.adafruit.com/neopixel-spats.md)
- [MagTag Case](https://learn.adafruit.com/magtag-case.md)
- [Magic Wand](https://learn.adafruit.com/magic-wand.md)
- [Superhero Power Gauntlet](https://learn.adafruit.com/superhero-power-gauntlet.md)
- [Portable 5in Monitor with HDMI](https://learn.adafruit.com/portable-5in-monitor-with-hdmi.md)
