# 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!


## Featured Products

### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
### Adafruit GEMMA v2 - Miniature wearable electronic platform

[Adafruit GEMMA v2 - Miniature wearable electronic platform](https://www.adafruit.com/product/1222)
 **Deprecation Warning: The Gemma bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Gemma so that people can maintain some older projects, we no longer recommend it.** <a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1222)
[Related Guides to the Product](https://learn.adafruit.com/products/1222/guides)
### Arduino GEMMA - Miniature wearable electronic platform

[Arduino GEMMA - Miniature wearable electronic platform](https://www.adafruit.com/product/2470)
What do you get when you combine&nbsp;an Adafruit classic with geniuses at Arduino? The Arduino GEMMA!&nbsp;It's a tiny wearable platform board with a lot of might in a 1" diameter package. Powered by a Attiny85 and programmable with an Arduino IDE over USB, you'll be able to...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2470)
[Related Guides to the Product](https://learn.adafruit.com/products/2470/guides)
### Adafruit NeoPixel Digital RGB LED Strip - White 60 LED

[Adafruit NeoPixel Digital RGB LED Strip - White 60 LED](https://www.adafruit.com/product/1138)
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! You wanted **twice the LEDs**? We got it (well, its 1.875 times as many but that's within a margin of...

In Stock
[Buy Now](https://www.adafruit.com/product/1138)
[Related Guides to the Product](https://learn.adafruit.com/products/1138/guides)
### NinjaFlex - 1.75mm Diameter - Snow White - 0.5 Kg

[NinjaFlex - 1.75mm Diameter - Snow White - 0.5 Kg](https://www.adafruit.com/product/1691)
Discontinued - **you can grab&nbsp;** [NinjaFlex - 1.75mm Diameter - Almond-Peach Smoothie - 0.50Kg](https://www.adafruit.com/product/2383) **instead!&nbsp;**

Looking beyond ABS? Tired of PLA? Open a world of possibilities, limited only by your imagination. NinjaFlex, a...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1691)
[Related Guides to the Product](https://learn.adafruit.com/products/1691/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### JST-PH Battery Extension Cable - 500mm

[JST-PH Battery Extension Cable - 500mm](https://www.adafruit.com/product/1131)
By popular demand, we now have a handy extension cord for all of our JST PH-terminated battery packs (such as our LiIon/LiPoly and 3xAAA holders). One end has a JST-PH compatible socket, and the other end has a matching plug. Between the two, 500mm of color coded wire. Handy for wearable...

In Stock
[Buy Now](https://www.adafruit.com/product/1131)
[Related Guides to the Product](https://learn.adafruit.com/products/1131/guides)
### Lithium Ion Polymer Battery - 3.7v 500mAh

[Lithium Ion Polymer Battery - 3.7v 500mAh](https://www.adafruit.com/product/1578)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 500mAh for a total of about 1.9 Wh. If you need a larger (or smaller!) battery, <a...></a...>

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

## Related Guides

- [Techno-Tiki RGB LED Torch](https://learn.adafruit.com/techno-tiki-rgb-led-torch.md)
- [Playa Festival Bike](https://learn.adafruit.com/playa-festival-bike.md)
- [Interior Purse Light](https://learn.adafruit.com/interior-purse-light.md)
- [Unibeam](https://learn.adafruit.com/unibeam.md)
- [Light-Activated Pixel Heart](https://learn.adafruit.com/light-activated-pixel-heart.md)
- [NeoPixel Tiara](https://learn.adafruit.com/neopixel-tiara.md)
- [Textile Potentiometer Hoodie](https://learn.adafruit.com/textile-potentiometer-hoodie.md)
- [Sensor Plotting with Mu and CircuitPython](https://learn.adafruit.com/sensor-plotting-with-mu-and-circuitpython.md)
- [Cosplay Glow Fur Raver Bandolier](https://learn.adafruit.com/cosplay-glow-fur-raver-bandolier.md)
- [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller.md)
- [Gemma Firewalker Lite Sneakers](https://learn.adafruit.com/gemma-led-sneakers.md)
- [Spy Theme Playback Device](https://learn.adafruit.com/spy-theme-playback-device.md)
- [CircuitPython Basics: Digital Inputs & Outputs](https://learn.adafruit.com/circuitpython-digital-inputs-and-outputs.md)
- [3D Printed Unicorn Horn](https://learn.adafruit.com/3d-printed-unicorn-horn.md)
- [Flashing LED Strand with MakeCode](https://learn.adafruit.com/flashing-led-strand-with-makecode.md)
