# Lego Neon NeoPixel Sign with CircuitPython

## Overview

https://youtu.be/UpLfFeXYoqU

In this project we’re building a Neon-like sign with NeoPixels and CircuitPython.

This uses a LEGO compatible base plate and 3D printed clips to build a light-up sign.

These NeoPixel strips are embedded inside a silicone diffuser so it looks just like real neon lights. The colors are vivid and the LEDs can get pretty bright.

![leds_hero-adabot-medium.gif](https://cdn-learn.adafruit.com/assets/assets/000/093/975/medium640thumb/leds_hero-adabot-medium.jpg?1597080832)

![leds_hero-adabot-close.gif](https://cdn-learn.adafruit.com/assets/assets/000/093/976/medium640thumb/leds_hero-adabot-close.jpg?1597080848)

Lots of folks are working remote so we figure it’d be nice to build a sign to let folks know when they’re stuck in meetings or recording their podcasts.

We hung it on our door with a thumbtack but you could also secure it with a command hook.

Since it’s LEGO compatible, you can adorn your sign with bricks and design something that is both playful and customizable.

![leds_door-side.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/963/medium640/leds_door-side.jpg?1597074687)

## Parts
### 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)

### Flexible Silicone Neon-like Skinny NeoPixel LED Strip

[Flexible Silicone Neon-like Skinny NeoPixel LED Strip](https://www.adafruit.com/product/4310)
You love NeoPixels, and you love silicone diffusion? Peep this&nbsp; **Flexible Silicone Neon-like Skinny NeoPixel LED Strip**! OK it's a bit of a mouthful, but check out the beautiful footage! It&nbsp;_looks_&nbsp;a lot like a slim strip of neon, but without the need...

In Stock
[Buy Now](https://www.adafruit.com/product/4310)
[Related Guides to the Product](https://learn.adafruit.com/products/4310/guides)
![Demo Video of hands squeezing and unraveling the illuminated Flexible Silicone Neon-like Skinny NeoPixel LED Strip.](https://cdn-shop.adafruit.com/product-videos/640x480/4310-00.jpg)

### Lithium Ion Cylindrical Battery - 3.7v 2200mAh

[Lithium Ion Cylindrical Battery - 3.7v 2200mAh](https://www.adafruit.com/product/1781)
Need a big battery for your project? This lithium-ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage, and over-current protection. Yet, it is slim and easy to fit into many project cases.  
  
This cell can provide 2 **C** of...

In Stock
[Buy Now](https://www.adafruit.com/product/1781)
[Related Guides to the Product](https://learn.adafruit.com/products/1781/guides)
![Lithium Ion Cylindrical Battery - 3.7v 2200mAh with JST PH connector](https://cdn-shop.adafruit.com/640x480/1781-04.jpg)

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

Out of Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
![Small, black, SPDT slide switch.](https://cdn-shop.adafruit.com/640x480/805-03.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

In 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)

### Part: 10" x 10" Brick Base Plate
quantity: 1
Strictly Briks Classic Baseplates 
[10" x 10" Brick Base Plate](https://amzn.to/2DVWsMS)

### Part: 10-wire ribbon cable
quantity: 1
silicone cover stranded-core
[10-wire ribbon cable](https://www.adafruit.com/product/3890)

![](https://cdn-learn.adafruit.com/assets/assets/000/093/990/medium800thumb/leds_code-loop.jpg?1597088436)

# Lego Neon NeoPixel Sign with CircuitPython

## Circuit Diagram

The diagram below provides a visual reference for wiring of the components. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Use Adafruit's Fritzing parts library to create circuit diagrams for your projects. Download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/093/985/medium800/leds_neon-circuit-diagram.jpg?1597083727)

## Wired Connections

- **5V** from LED Strip to **3V** on Feather
- **GND** from LED Strip to **GND** on Feather
- **DIN** from LED Strip to **Pin #6** &nbsp;on Feather
- Switch to **GND** on Feather
- Switch to **EN** on Feather

## Powering

The Adafruit board can be powered via USB or JST using a 3.7v lipo battery. In this project, a 2200mAh lipo battery is used. The lipo battery is rechargeable via the USB port on the board. The switch is wired to the **enable** &nbsp;and&nbsp; **ground** pins on the board.

# Lego Neon NeoPixel Sign with CircuitPython

## 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 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).

# Lego Neon NeoPixel Sign with CircuitPython

## Code

## Coding

This project uses the LED animation rainbow example code from the CircuitPython LED Animation guide. The code is modified slightly to accommodate the additional pixels used in the sign.

![leds_CP-hero.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/979/medium640/leds_CP-hero.jpg?1597081138)

Once we have all the files we need, a directory listing will look similar to above as far as files and directories.

## The Mu Python Editor

Mu is a simple Python editor that works with Adafruit CircuitPython hardware. It's written in Python and works on Windows, MacOS, Linux and Raspberry Pi. The serial console is built right in, so you get immediate feedback from your board's serial output! While you can use any text editor with your code, Mu makes it super simple. [Instructions for Mu are available here](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

## Installing or upgrading CircuitPython

You should ensure you have CircuitPython 5.0 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.0 or greater.&nbsp;

```python
Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit Feather M4 Express with samd51j19
```

## Installing Project Code

To use with CircuitPython, you need to first install a few libraries, into the lib folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, open the directory **examples**** / **and then click on the directory that matches the version of CircuitPython you're using and copy the contents of that directory to your** CIRCUITPY** drive.

Your **CIRCUITPY** drive should now look similar to the following image:

![CIRCUITPY](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/led-animation_led_animation_rainbow_animations.py.png )

https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation/blob/main/examples/led_animation_rainbow_animations.py

## Adjust Code

Look for the following lines in the code and adjust to fit your project. Use any text editor or favorite IDE to modify the code. We suggest using Mu as noted above.

If your NeoPixel strip uses more or less LEDs, you will change the number to reflect your setup.

```python
# Update to match the pin connected to your NeoPixels
pixel_pin = board.D6
# Update to match the number of NeoPixels you have connected
pixel_num = 84
```

## Upload Code

**Ensure the file** is named **code.py** &nbsp;and drop it onto the **CIRCUITPY** drive main (root) directory that appears when your Feather is plugged into your computer via a known good USB data cable. The code will run properly when all of the files have been uploaded including libraries.

## Customizing LED Animations

Take a moment to walk through the LED animation library for CircuitPython learn guide. The guide covers the different animation types and how to change attributes such as color, speed, size and spacing.

[Learn Guide: CircuitPython LED Animations](https://learn.adafruit.com/circuitpython-led-animations/rainbows)
# Lego Neon NeoPixel Sign with CircuitPython

## 3D Printing

## Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below.

- 2200mah-lego-stud
- Feather-Lego-studs
- Lego-door-hook
- Lego-slide-studs
- Lego-neon-0
- Lego-neon-15
- Lego-neon-30
- Lego-neon-45

Additional optional parts

- Feather-Lego-tubes
- Lego-500-bat-pocket-studs

![leds_3d-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/955/medium640/leds_3d-parts.jpg?1597071696)

![leds_3d-parts-2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/956/medium640/leds_3d-parts-2.jpg?1597071788)

[Download LED clip STLs](https://www.thingiverse.com/thing:4566600)
[Download CAD files from PrusaPrinters](https://www.prusaprinters.org/prints/37986-lego-neon-sign-with-neopixels)
## Fusion 360 Links
[Feather Lego mount Studs](https://a360.co/33Sr78C)
[Feather Lego mount tubes](https://a360.co/3kyq7N9)
[2200mAh lipo Lego holder](https://a360.co/2XMVRV3)
[Wall mount](https://a360.co/2DVFTAz)
[Slide Switch](https://a360.co/3kyigPl)
## Slicing Parts

Slice with setting for PLA material. The parts were sliced using CURA using the slice settings below.

- PLA filament 200c extruder
- 0.2 layer height
- 4% gyroid infill
- 60mm/s print speed
- 60c heated bed

![leds_slice.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/957/medium640/leds_slice.jpg?1597072206)

## Glue&nbsp;

We use super glue to adhere the brick studs / tubes. Apply small even dots on one of the part, align both parts and gently press together. Allow to the parts the dry for at least 10 mins before use.

![leds_glue-studs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/958/medium640/leds_glue-studs.jpg?1597072436)

# Lego Neon NeoPixel Sign with CircuitPython

## Assemble

## Test shape

The clips are designed with a few different angles so you can make all sorts of characters and letters.

The NeoPixel strips are pretty flexible so they can easily bend to form different shapes.&nbsp;

Just press them in between the clips and adjust the position to spell out words.

![leds_strip-holders.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/965/medium640/leds_strip-holders.jpg?1597077861)

## Cut strips to size

You can cut the NeoPixel strips by following the visible lines across the back side of the sheathing.

To reveal the solder pads, you’ll want to carefully cut through the silicone while leaving a strip over the LED so the lightning is still diffused.

Labels are printed on the flexible PCB so you can see what the connections are for power, ground and data.

You can tin the pads by applying a bit of solder using the tip of the soldering iron.&nbsp;

## Size wire

Silicone cover stranded core ribbon wire can be used for connecting multiple strips together.

![leds_strip-diffusion.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/966/medium640/leds_strip-diffusion.jpg?1597077963)

![leds_strip-wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/967/medium640/leds_strip-wires.jpg?1597078001)

## Chain shapes

Multiple strips are daisy chained together to spell out the word, “BUSY” but it doesn’t have to be letters.

The wiring was sized and planned so the animations flows from one letter to the next.

## Adjust shape

The tolerances are tight and the silicone sheathing provides a decent grip, allowing you to fine adjust shapes.

![leds_strip-chain.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/968/medium640/leds_strip-chain.jpg?1597078090)

![leds_strip-adjust.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/969/medium640/leds_strip-adjust.jpg?1597078143)

## Assemble Feather

The Feather is positioned nearby with the battery snap fitted close to the center.

## Slide Switch

A slide switch is installed near the edge of the base plate so the sign can easily be turned on and off.

Press fit by inserting the slide switch at angle. The metal tabs on the sides can be adjust to increase the tolerance of the fit.

![leds_feather-arrange.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/959/medium640/leds_feather-arrange.jpg?1597072649)

![leds_slide-press.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/960/medium640/leds_slide-press.jpg?1597072687)

## Attach lipo battery

The 2200mAh lipo battery can slide into the holder. Position so the battery and cable can reach the Feather board.

![leds_lipo-arrange.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/970/medium640/leds_lipo-arrange.jpg?1597078237)

## Adjust height clearance&nbsp;

Extra bricks can be used to raise the base plate away from the door.

This way there’s enough clearance for the components on the back.

![leds_height-offset.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/971/medium640/leds_height-offset.jpg?1597078356)

## Wall hook

A wall mount part is snap fitted to the top middle brick so it can be hung on the door.

We found a thumb tack or hook was strong enough to hold the weight of the sign and components.

&nbsp;

![leds_wall-mount-press.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/973/medium640/leds_wall-mount-press.jpg?1597078577)

![leds_wall-tac.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/974/medium640/leds_wall-tac.jpg?1597078615)

![](https://cdn-learn.adafruit.com/assets/assets/000/093/980/medium800thumb/leds_neon-loop-crop.jpg?1597081234)


## Featured Products

### Flexible Silicone Neon-like Skinny NeoPixel LED Strip

[Flexible Silicone Neon-like Skinny NeoPixel LED Strip](https://www.adafruit.com/product/4310)
You love NeoPixels, and you love silicone diffusion? Peep this&nbsp; **Flexible Silicone Neon-like Skinny NeoPixel LED Strip**! OK it's a bit of a mouthful, but check out the beautiful footage! It&nbsp;_looks_&nbsp;a lot like a slim strip of neon, but without the need...

In Stock
[Buy Now](https://www.adafruit.com/product/4310)
[Related Guides to the Product](https://learn.adafruit.com/products/4310/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)
### Lithium Ion Cylindrical Battery - 3.7v 2200mAh

[Lithium Ion Cylindrical Battery - 3.7v 2200mAh](https://www.adafruit.com/product/1781)
Need a big battery for your project? This lithium-ion battery contains a 2200mAh and a protection circuit that provides over-voltage, under-voltage, and over-current protection. Yet, it is slim and easy to fit into many project cases.  
  
This cell can provide 2 **C** of...

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

Out of Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long

[Silicone Cover Stranded-Core Ribbon Cable - 10 Wire 1 Meter Long](https://www.adafruit.com/product/3890)
For those who are fans of our silicone-covered wires, but are always looking to _up their wiring game_. We now have **Silicone Cover Ribbon cables!** These may look _a lot_ like <a...></a...>

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

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

## Related Guides

- [Adafruit Feather M4 Express](https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51.md)
- [CircuitPython 101: Basic Builtin Data Structures](https://learn.adafruit.com/basic-datastructures-in-circuitpython.md)
- [Simple Vertical Wordclock](https://learn.adafruit.com/vertical-wordclock.md)
- [Air Quality Sensor 3D Printed Enclosure](https://learn.adafruit.com/air-quality-sensor-silo-house.md)
- [Adding a WiFi Co-Processor to CircuitPython](https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32.md)
- [Light Up Prop with Prop-Maker](https://learn.adafruit.com/prop-maker-light-wand.md)
- [Humidity and Temperature Monitor with E-Ink Display](https://learn.adafruit.com/humidity-and-temperature-monitor-redux-e-ink-display.md)
- [Controlling Objects in Unity with a 9 DoF Sensor and Arduino](https://learn.adafruit.com/controlling-objects-in-unity-with-arduino.md)
- [MP3 Playback in CircuitPython with Lars the Sloth Puppet](https://learn.adafruit.com/mp3-circuitpython-lars.md)
- [I Vote(d) Pin](https://learn.adafruit.com/i-vote-d-pin.md)
- [MakeCode Arcade with SAMD51 M4](https://learn.adafruit.com/makecode-arcade-with-samd51-m4.md)
- [IoT Air Quality Sensor with Adafruit IO](https://learn.adafruit.com/diy-air-quality-monitor.md)
- [DIY Robotic Sky Tracking Astrophotography Mount with CircuitPython](https://learn.adafruit.com/diy-robotic-sky-tracking-astrophotography-mount.md)
- [eInk FeatherWing Display Stand](https://learn.adafruit.com/eink-featherwing-display-stand.md)
- [Esenciales para CircuitPython](https://learn.adafruit.com/esenciales-para-circuitpython.md)
- [Use circup to easily keep your CircuitPython libraries up to date](https://learn.adafruit.com/keep-your-circuitpython-libraries-on-devices-up-to-date-with-circup.md)
