# Light Up your Costume with Noods

## Overview

https://youtu.be/AanSg1J2kLg

Adafruit nOOds are little noodles of light. They're as simple to use as a regular LED - connect one end to power and one end to ground, and they light up and glow. They're incredibly bendy and flexible, making them just perfect for small subtle costume details. A nOOds will last for hours on a single coin cell battery, with no big noisy EL-wire inverter to manage.

We'll also get a little crazy and hook 3 nOOds up to a QT Py microcontroller, so they can be dimmed or sequenced using CircuitPython code.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/465/medium800/el_wire_tape_panel_shane_smile2.jpeg?1673295441)

Featured
### nOOds - Flexible LED Filament - 3V 300mm long - Warm White

[nOOds - Flexible LED Filament - 3V 300mm long - Warm White](https://www.adafruit.com/product/5503)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they&nbsp;_are&nbsp;_good for...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5503)
[Related Guides to the Product](https://learn.adafruit.com/products/5503/guides)
![Video of a pair of white hands coiling and playing with a 300mm long warm white LED filament.](https://cdn-shop.adafruit.com/product-videos/640x480/5503-03.jpg)

Featured
### nOOds - Flexible LED Filament - 3V 300mm long - Red

[nOOds - Flexible LED Filament - 3V 300mm long - Red](https://www.adafruit.com/product/5506)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they are&nbsp;good for cool lighting...

In Stock
[Buy Now](https://www.adafruit.com/product/5506)
[Related Guides to the Product](https://learn.adafruit.com/products/5506/guides)
![Video of a pair of white hands coiling and playing with a 300mm long red LED filament.](https://cdn-shop.adafruit.com/product-videos/640x480/5506-02.jpg)

Featured
### nOOds - Flexible LED Filament - 3V 300mm long - Blue

[nOOds - Flexible LED Filament - 3V 300mm long - Blue](https://www.adafruit.com/product/5508)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they are&nbsp;good for cool lighting...

In Stock
[Buy Now](https://www.adafruit.com/product/5508)
[Related Guides to the Product](https://learn.adafruit.com/products/5508/guides)
![Close-up video of a pair of white hands coiling and playing with a 300mm long blue LED filament.](https://cdn-shop.adafruit.com/product-videos/640x480/5508-04.jpg)

## Single nOOds Projects

All you need to light up a single nOOds is a coin cell battery. Here are a couple in the store with built-in on-off switches, and one that includes two blink modes.

### Single CR2032 / 20mm Coin Cell Battery Holder with Switch

[Single CR2032 / 20mm Coin Cell Battery Holder with Switch](https://www.adafruit.com/product/4856)
This tiny coin cell battery holder is ideal for small portable or wearable projects. It holds one 20mm coin cell&nbsp;(also known as CR2032) in series to generate 3V nominal. 20mm coin cells are popular as they are used in keychain lights and remotes, so they are easy to get&nbsp;and fairly...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4856)
[Related Guides to the Product](https://learn.adafruit.com/products/4856/guides)
![Angled shot of a Single CR2032 / 20mm Coin Cell Battery Holder with Switch with a Cell Battery inserted. ](https://cdn-shop.adafruit.com/640x480/4856-07.jpg)

### 20mm Coin Cell Breakout w/On-Off Switch (CR2032)

[20mm Coin Cell Breakout w/On-Off Switch (CR2032)](https://www.adafruit.com/product/1871)
Simple but effective - this sewable breakout board has a CR2032 coin cell battery holder soldered on, an on/off switch and 0.1" pitch breakout pins for easy connecting. Great for powering very low-current projects, or adding a battery backup circuit to a real-time-clock or similar....

Out of Stock
[Buy Now](https://www.adafruit.com/product/1871)
[Related Guides to the Product](https://learn.adafruit.com/products/1871/guides)
![Angled shot of a 20mm Coin Cell Breakout Board w/ On-Off Switch.](https://cdn-shop.adafruit.com/640x480/1871-08.jpg)

## Multiple nOOds Projects

You can power multiple nOOds from a microcontroller and have a lot more control over your lighting effects. Use CircuitPython code to dim or sequence or blink the nOOds so they really sell your cosplay character. This is a more complicated project but the results can be spectacular.

Featured
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

### Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25

[Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25](https://www.adafruit.com/product/2780)
ΩMG! You're not going to be able to resist these handy resistor packs!&nbsp;Well, axially, they&nbsp;do all of the resisting for you!

This is a **25 Pack of 220Ω Resistors.** More specifically, they are **carbon film** , through-hole...

In Stock
[Buy Now](https://www.adafruit.com/product/2780)
[Related Guides to the Product](https://learn.adafruit.com/products/2780/guides)
![Angled shot of 25 Through-Hole Resistors - 220 ohm 5% 1/4W.](https://cdn-shop.adafruit.com/640x480/2780-00.jpg)

### Switched JST-PH 2-Pin SMT Right Angle Breakout Board

[Switched JST-PH 2-Pin SMT Right Angle Breakout Board](https://www.adafruit.com/product/1863)
This switched JST connector is the best way to quickly prototype with our LiPoly batteries. We paired a genuine JST connector with a slide switch that can do up to 600mA. Both are soldered onto a breadboard-friendly breakout. There's two ground pins, one 'switched' power pin, and...

In Stock
[Buy Now](https://www.adafruit.com/product/1863)
[Related Guides to the Product](https://learn.adafruit.com/products/1863/guides)
![Switched JST-PH 2-Pin SMT Right Angle Breakout Board.](https://cdn-shop.adafruit.com/640x480/1863-04.jpg)

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

In Stock
[Buy Now](https://www.adafruit.com/product/1578)
[Related Guides to the Product](https://learn.adafruit.com/products/1578/guides)
![Angled shot of a Lithium Ion Polymer Battery 3.7V 500mAh with JST-PH connector.](https://cdn-shop.adafruit.com/640x480/1578-03.jpg)

### Adafruit Micro Lipo - USB LiIon/LiPoly charger

[Adafruit Micro Lipo - USB LiIon/LiPoly charger](https://www.adafruit.com/product/1304)
Oh so adorable, this is the tiniest little lipo charger, so handy you can keep it any project box! Its also easy to use. Simply plug in the gold plated contacts into any USB port and a 3.7V/4.2V lithium polymer or lithium ion rechargeable battery into the JST plug on the other end. There are...

In Stock
[Buy Now](https://www.adafruit.com/product/1304)
[Related Guides to the Product](https://learn.adafruit.com/products/1304/guides)
![Top view of Adafruit Micro Lipo - USB LiIon/LiPoly charger - v1 above a 2-pin JST cable.](https://cdn-shop.adafruit.com/640x480/1304-06.jpg)

# Light Up your Costume with Noods

## Wiring Diagram

## One nOOd
![](https://cdn-learn.adafruit.com/assets/assets/000/117/530/medium800/el_wire_tape_panel_wiring_onenood2_bb.jpg?1673457933)

If you're using just one nOOd, the wiring is very simple. The + side goes to SW (switch) and the - end goes to Gnd.&nbsp;

## Multiple nOOds with Software Control
This wiring diagram shows how to connect 3 nOOds to a QT Py Stemma, and includes some bells and whistles: a JST connector with on/off switch, and current-limiting 220 ohm resistors.

This is a more complicated project, but it gives you a lot of control, as well as access to a much juicier battery source than a single coin cell can provide.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/529/medium800/el_wire_tape_panel_wiring_noods3_bb.jpg?1673456905)

### nOOds Hookup

- QT Py Stemma GND --\> nOOds G (all 3 connected to the same pin)
- QT Py Stemma SCL --\> nOOds +
- QT Py Stemma SDA --\> nOOds -
- QT Py A3 --\> nOOds +

You can keep adding nOOds to the remaining GPIO pins on the QT Py for larger projects, or if you want even more nOOds, you can add on an [Adafruit AW9523 GPIO Expander and LED Driver Breakout](https://www.adafruit.com/product/4886). Check out the [&nbsp;nOOds Uberguide](https://learn.adafruit.com/noods-uberguide) for more info.

JST Power Switch

- QT Py G --\> JST Breakout G
- QT Py 5v --\> JST Breakout Sw

# Light Up your Costume with Noods

## One nOOd

![](https://cdn-learn.adafruit.com/assets/assets/000/117/475/medium800/el_wire_tape_panel_masks.jpg?1673300069)

One nOOd can be powered from a single coin cell battery. This is the easiest way to get your lights up and running. Watch the video at the head of this tutorial for a step-by-step build.

1. [Identify the + and - ends](https://learn.adafruit.com/noods-uberguide/electrical-properties) of the nOOd. Use alligator clips to connect the nOOd temporarily to the wires coming from the battery holder. When the nOOd lights up, you've got it the right way round. If it doesn't work, try reversing the connections.

2. Slip some heat shrink on and solder the nOOd to the wire. You'll get the best connection if you make a bend in the nOOd connector and in the wire, and hook them together before soldering. Take a little time and get it really well connected. This will make it far less likely for your costume to break while you're out wearing it.

3. Solder the other end as well.

4. Use tape, hot glue, or E6000 to fix the nOOd into your costume. It's silicone-coated so a lot of glues won't stick to it. I used a combination of masking tape and hot glue for the goggles project, which doesn't get a lot of jostling since the goggles live permanently on the hat.&nbsp;

I also added a nOOd to a halloween mask using a [switched coin cell breakout](https://www.adafruit.com/product/1871) (+ to Sw, - to G). I used hot glue to attach the nOOd to the mask and it lasted for one night before starting to come off. I later fixed it with E6000 adhesive and it's still going strong.

![el_wire_tape_panel_mask_back.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/389/medium640/el_wire_tape_panel_mask_back.jpeg?1673213310)

![el_wire_tape_panel_mask_front.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/390/medium640/el_wire_tape_panel_mask_front.jpeg?1673213415)

![](https://cdn-learn.adafruit.com/assets/assets/000/117/478/medium800/el_wire_tape_panel_erin_mask2.jpeg?1673303337)

# Light Up your Costume with Noods

## Multiple nOOds

![](https://cdn-learn.adafruit.com/assets/assets/000/117/392/medium800/el_wire_tape_panel_00_allthestuff.jpeg?1673213492)

Adding one nOOd is fun, but adding a handful of sequence-able and code-able nOOd is way more fun.&nbsp;

If this looks intimidating, or if you don't care about software control, you can get a similar effect by using multiple single nOOds each hooked up to its own coin cell battery holder. If you're ready for a Project, and not afraid of a little soldering, read on.

[Identify the + and - ends](https://learn.adafruit.com/noods-uberguide/electrical-properties) of your nOOds by sight, and confirm by touching the bare metal ends to each side of a coin cell battery. Mark the nOOds with some tape so you remember which end is which.

![el_wire_tape_panel_01_coincell_test.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/393/medium640/el_wire_tape_panel_01_coincell_test.jpeg?1673213656)

We'll solder a red wire to the + end and black wire to the - end. To get a really good solder connection, make a bend in the nOOds connector and a bend in the wire, and hook them together before soldering. This will make it far less likely for your solder joint to break, leaving you in the dark.

![el_wire_tape_panel_02_bendnood.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/394/medium640/el_wire_tape_panel_02_bendnood.jpeg?1673213714)

Solder a red wire to the + end and a black wire to the - end of all your nOOds. The wire lengths will depend on your project. Remember that both wires need to reach back to the microcontroller.

![el_wire_tape_panel_04_noods_soldered.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/395/medium640/el_wire_tape_panel_04_noods_soldered.jpeg?1673213796)

Now let's add the resistors. I'm using 220ohm resistors. Use something in that neighborhood to keep your nOOds from burning out - the QT Py puts out 5v of current, and the nOOds prefer closer to 3v. They'll break if you feed them too much.

Bend the resistor leg into a loop and wind it around itself to give yourself a place to hook your wire. Solder a wire to each end -- it doesn't matter which end is which -- and cover the whole resistor with heat shrink.

![el_wire_tape_panel_05_resistor_bend.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/396/medium640/el_wire_tape_panel_05_resistor_bend.jpeg?1673213864)

![el_wire_tape_panel_06_resistor.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/397/medium640/el_wire_tape_panel_06_resistor.jpeg?1673213986)

![el_wire_tape_panel_07_heatshrink.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/399/medium640/el_wire_tape_panel_07_heatshrink.jpeg?1673214062)

Each red nOOd wire needs to go to its own GPIO pin, so we can light them individually from the software.

Solder one of the red wires from your nOOds to the yellow wire and one to the green wire on the Stemma connector. We'll use these two wires as GPIO pins.

Twist all the black wires from your nOOds together and solder them to the black wire on your Stemma connector. All the black wires go to G (ground).

&nbsp;

![el_wire_tape_panel_08_stemma_wired.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/400/medium640/el_wire_tape_panel_08_stemma_wired.jpeg?1673214085)

I have a third nOOd in my project, so I'll use one of the other GPIO pins on the Stemma for the remaining red wire. Additional nOOd could be added to the rest of the available pins, and all can connect to the same G pin.

![el_wire_tape_panel_09_qtpy_noods_wired.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/401/medium640/el_wire_tape_panel_09_qtpy_noods_wired.jpeg?1673214289)

This is a great moment to stop and test your wiring. Skip ahead to the CircuitPython page and install the software, then upload your code.

Plug your QT Py in via the USB port and see if your nOOds come on.&nbsp;

If most but not all of them come on, check the faulty one to be sure you didn't mix up the + and - ends. If none of them come on, the trouble is probably with your software. Head back to the software page and try uploading again.

Once the nOOds are all coming on, let's add our power switch.

The JST breakout is a handy little thing with an on-off switch built in. You can plug any of our LiPoly batteries in and run your project for hours.

Solder 5V on the QT Py to the Sw pin (the one connected to the switch) and connect G to G.

![el_wire_tape_panel_10_jstswitch.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/402/medium640/el_wire_tape_panel_10_jstswitch.jpeg?1673214537)

# Light Up your Costume with Noods

## CircuitPython

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

## Set up CircuitPython Quick Start!

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

If you want to get started with your QT Py, and you have NOT soldered a chip to the back of it, download CircuitPython from the following link:

[Download the latest version of CircuitPython for your QT Py from CircuitPython.org](https://circuitpython.org/board/qtpy_m0/)
Warning: 

[Download the latest version of CircuitPython for your QT Py Haxpress from CircuitPython.org](https://circuitpython.org/board/qtpy_m0_haxpress/)
 **Click the link above and download the latest UF2 file.**

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

![adafruit_products_QT_Py_CP_download.png](https://cdn-learn.adafruit.com/assets/assets/000/095/209/medium640/adafruit_products_QT_Py_CP_download.png?1601397466)

Plug your QT Py 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 small **RST (reset)** button, and you will see the NeoPixel RGB LED turn green. If it turns red, check the USB cable, try another USB port, etc.

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

![adafruit_products_QT_Py_neopixel_green.png](https://cdn-learn.adafruit.com/assets/assets/000/095/210/medium640/adafruit_products_QT_Py_neopixel_green.png?1601397596)

You will see a new disk drive appear called **QTPY\_BOOT**.

&nbsp;

&nbsp;

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to&nbsp; **QTPY\_BOOT**

![adafruit_products_QT_Py_BOOT_drive.png](https://cdn-learn.adafruit.com/assets/assets/000/095/211/medium640/adafruit_products_QT_Py_BOOT_drive.png?1601400747)

![adafruit_products_QT_Py_drag_UF2.png](https://cdn-learn.adafruit.com/assets/assets/000/095/212/medium640/adafruit_products_QT_Py_drag_UF2.png?1601400759)

The red LED will flash. Then, the **QTPY\_BOOT** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

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

![adafruit_products_QT_Py_CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/095/213/medium640/adafruit_products_QT_Py_CIRCUITPY.png?1601400772)

# Light Up your Costume with Noods

## Creating and Editing Code

One of the best things about CircuitPython is how simple it is to get code up and running. This section covers how to create and edit your first CircuitPython program.

To create and edit code, all you'll need is an editor. There are many options. **Adafruit strongly recommends using Mu! It's designed for CircuitPython, and it's really simple and easy to use, with a built in serial console!**

If you don't or can't use Mu, there are a number of other editors that work quite well. The [Recommended Editors page](https://learn.adafruit.com/welcome-to-circuitpython/recommended-editors) has more details. Otherwise, make sure you do "Eject" or "Safe Remove" on Windows or "sync" on Linux after writing a file if you aren't using Mu. (This was formerly not a problem on macOS, but see the warning below.)

Warning: macOS Sonoma 14.1 introduced a bug that delays writes to small drives such as CIRCUITPY drives. This caused errors when saving files to CIRCUITPY. There is a [workaround](https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#macos-sonoma-14-dot-x-disk-errors-writing-to-circuitpy-3160304). The bug was fixed in Sonoma 14.4, but at the cost of greatly slowed writes to drives 1GB or smaller. 

## Creating Code
Installing CircuitPython generates a **code.py** file on your **CIRCUITPY** drive. To begin your own program, open your editor, and load the **code.py** file from the **CIRCUITPY** drive.

If you are using Mu, click the **Load** button in the button bar, navigate to the **CIRCUITPY** drive, and choose **code.py**.

![circuitpython_WtCP_Mu_open_code_py.png](https://cdn-learn.adafruit.com/assets/assets/000/105/703/medium640/circuitpython_WtCP_Mu_open_code_py.png?1634763740)

Copy and paste the following code into your editor:

```python
import board
import digitalio
import time

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

while True:
    led.value = True
    time.sleep(0.5)
    led.value = False
    time.sleep(0.5)
```

Danger: The KB2040, QT Py , Qualia, and the Trinkeys do not have a built-in little red LED! There is an addressable RGB NeoPixel LED. The above example will NOT work on the KB2040, QT Py, Qualia, or the Trinkeys!

If you're using a KB2040, QT Py, Quaila, or a Trinkey, or any other board without a single-color LED that can blink, please download the [NeoPixel blink example](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Welcome_to_CircuitPython/code.py).

Info: 

It will look like this. Note that under the `while True:` line, the next four lines begin with four spaces to indent them, and they're indented exactly the same amount. All the lines before that have no spaces before the text.

![circuitpython_WtCP_Mu_blink_example.png](https://cdn-learn.adafruit.com/assets/assets/000/105/704/medium640/circuitpython_WtCP_Mu_blink_example.png?1634763853)

Save the **code.py** file on your **CIRCUITPY** drive.

![circuitpython_WtCP_Mu_save_bliink_example.png](https://cdn-learn.adafruit.com/assets/assets/000/105/705/medium640/circuitpython_WtCP_Mu_save_bliink_example.png?1634763954)

The little LED should now be blinking. Once per half-second.

Congratulations, you've just run your first CircuitPython program!

Info: On most boards you'll find a tiny red LED. On the ItsyBitsy nRF52840, you'll find a tiny blue LED. On QT Py M0, QT Py RP2040, Qualia, and the Trinkey series, you will find only an RGB NeoPixel LED.

## Editing Code
To edit code, open the&nbsp; **code.py** &nbsp;file on your **CIRCUITPY** drive into your editor.

&nbsp;

Make the desired changes to your code. Save the file. That's it!

![circuitpython_WtCP_Mu_open_code_py.png](https://cdn-learn.adafruit.com/assets/assets/000/105/706/medium640/circuitpython_WtCP_Mu_open_code_py.png?1634764153)

### Your code changes are run as soon as the file is done saving.

There's one warning before you continue...

Danger: 

The CircuitPython code on your board detects when the files are changed or written and will automatically re-start your code. This makes coding very fast because you save, and it re-runs. If you unplug or reset the board before your computer finishes writing the file to your board, you can corrupt the drive. If this happens, you may lose the code you've written, so it's important to backup your code to your computer regularly.

There are a couple of ways to avoid filesystem corruption.

### **1. Use an editor that writes out the file completely when you save it.**

Check out the [Recommended Editors page](https://learn.adafruit.com/welcome-to-circuitpython/recommended-editors) for details on different editing options.

Info: 

### **2. Eject or Sync the Drive After Writing**

If you are using one of our not-recommended-editors, not all is lost! You can still make it work.

On Windows, you can Eject or Safe Remove the **CIRCUITPY** drive. It won't actually eject, but it will force the operating system to save your file to disk. On Linux, use the **sync** command in a terminal to force the write to disk.

You also need to do this if you use Windows Explorer or a Linux graphical file manager to drag a file onto **CIRCUITPY**.

### 

Don't worry! Corrupting the drive isn't the end of the world (or your board!). If this happens, follow the steps found on the [Troubleshooting](https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting) page of every board guide to get your board up and running again.

Info: If you are having trouble saving code on Windows 10, try including this code snippet at the top of <b>code.py</b>:

```python
import supervisor
supervisor.runtime.autoreload = False
```

## Back to Editing Code...

Now! Let's try editing the program you added to your board. Open your **code.py** file into your editor. You'll make a simple change. Change the first `0.5` to `0.1`. The code should look like this:

```python
import board
import digitalio
import time

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

while True:
    led.value = True
    time.sleep(0.1)
    led.value = False
    time.sleep(0.5)
```

Leave the rest of the code as-is. Save your file. See what happens to the LED on your board? Something changed! Do you know why?

You don't have to stop there! Let's keep going. Change the second `0.5` to `0.1` so it looks like this:

```auto
while True:
    led.value = True
    time.sleep(0.1)
    led.value = False
    time.sleep(0.1)
```

Now it blinks really fast! You decreased the both time that the code leaves the LED on and off!

Now try increasing both of the `0.1` to `1`. Your LED will blink much more slowly because you've increased the amount of time that the LED is turned on and off.

Well done! You're doing great! You're ready to start into new examples and edit them to see what happens! These were simple changes, but major changes are done using the same process. Make your desired change, save it, and get the results. That's really all there is to it!

# Naming Your Program File
CircuitPython looks for a code file on the board to run. There are four options: **code.txt** , **code.py** , **main.txt** and **main.py**. CircuitPython looks for those files, in that order, and then runs the first one it finds. While **code.py** is the recommended name for your code file, it is important to know that the other options exist. If your program doesn't seem to be updating as you work, make sure you haven't created another code file that's being read instead of the one you're working on.

# Light Up your Costume with Noods

## Example Code

Here are a few code samples to get you started.

Plug your computer into the QY Py via a known, good power+data USB cable. A new thumb drive named **CIRCUITPY** should appear.

Download the file and save it as **code.py** at the root of your **CIRCUITPY** drive to install.

### All On

This code will turn all of the noods on.

```auto
# Adafruit nOOds digital control using GPIO pins.
# Uses 3 nOOds, anode (+) to GPIO pin, cathode (-) to ground.
# A current-limiting resistor (e.g. 220 Ohm) can go at either end.

import time
import board
import digitalio

# This uses 3 pins on QtPy RP2040, but any pins will do.
PINS = (board.A3, board.SDA, board.SCL) # List of pins, one per nOOd

# Convert pin number list to pin object list, initialize to OFF
pin_list = [digitalio.DigitalInOut(pin) for pin in PINS]
for pin in pin_list:
    pin.direction = digitalio.Direction.OUTPUT
    pin.value = 0

while True:              # Repeat forever...
    for pin in pin_list: # For each pin...
        pin.value = True # nOOd on
```

### Blink in Sequence

This code blinks each nood in sequence.

```auto
# Adafruit nOOds digital control using GPIO pins.
# Uses 3 nOOds, anode (+) to GPIO pin, cathode (-) to ground.
# A current-limiting resistor (e.g. 220 Ohm) can go at either end.

import time
import board
import digitalio

# This uses 3 pins on QtPy RP2040, but any pins will do.
PINS = (board.A3, board.SDA, board.SCL) # List of pins, one per nOOd

# Convert pin number list to pin object list, initialize to OFF
pin_list = [digitalio.DigitalInOut(pin) for pin in PINS]
for pin in pin_list:
    pin.direction = digitalio.Direction.OUTPUT
    pin.value = False

while True:               # Repeat forever...
    for pin in pin_list:  # For each pin...
        pin.value = True  # nOOd on
        time.sleep(0.5)   # Pause 1/2 sec
        pin.value = False # nOOd off
```

### Fade in Sequence

This code provides a fade effect, sequencing each nood.

```auto
# Adafruit nOOds "analog" (PWM) brightness control using GPIO.
# Uses 3 nOOds, anode (+) to GPIO pin, cathode (-) to ground.
# A current-limiting resistor (e.g. 220 Ohm) can go at either end.

import math
import time
import board
import pwmio

# This uses 3 pins on QtPy RP2040, but any pins will do.
PINS = (board.A3, board.SDA, board.SCL) # List of pins, one per nOOd
GAMMA = 2.6  # For perceptually-linear brightness

# Convert pin number list to PWMOut object list
pin_list = [pwmio.PWMOut(pin, frequency=1000, duty_cycle=0) for pin in PINS]

while True:                            # Repeat forever...
    for i, pin in enumerate(pin_list): # For each pin...
        # Calc sine wave, phase offset for each pin, with gamma correction.
        # If using red, green, blue nOOds, you'll get a cycle of hues.
        phase = (time.monotonic() - 2 * i / len(PINS)) * math.pi
        brightness = int((math.sin(phase) + 1.0) * 0.5 ** GAMMA * 65535 + 0.5)
        pin.duty_cycle = brightness
```

# Light Up your Costume with Noods

## Costume Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/117/477/medium800/el_wire_tape_panel_shane_mirror.jpeg?1673303031)

## Zoot Suit Glowing Pocket Square

This Zoot Suit has a breast pocket which is perfect for hiding electronics and batteries. I've added a nOOds to the pocket square and two nOOds to the underside of the coat's lapels.

I'm using a piece of iridescent organza as a pocket square. This kind of fabric is translucent and picks up the light from the nOOds very well. A white silk square would work well too.

Fold over one edge of your pocket square with the nOOds inside. Carefully stitch along the edge, being very careful not to hit the nOOds with your needle.

![el_wire_tape_panel_pocketsquare_sew.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/404/medium640/el_wire_tape_panel_pocketsquare_sew.jpeg?1673214857)

![el_wire_tape_panel_pocketsquare_done.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/405/medium640/el_wire_tape_panel_pocketsquare_done.jpeg?1673214957)

## Zoot Suit Lapels
First I threaded the nOOds through a small hole in the pocket lining and into the suit lining, then pulled them through a small hole in the back of the lapel. This keeps all the wires on the interior of the suit lining and out of my way.

I attached my nOOds to the underside of the suit's lapels, about 1/8" from the edge so they cast an indirect, subtle glow. I sewed them in place by hand, using a clear monofilament sewing thread which disappears against the light.&nbsp;

![el_wire_tape_panel_lapel_sew.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/407/medium640/el_wire_tape_panel_lapel_sew.jpeg?1673215021)

I did need to lenghten some of the wires and shorten others once I had all the elements in place. This isn't too hard to do as you build your project. Just be sure you've got plenty of extra wire and heat shrink on hand.

Once all the wires were managed and stitched into place, I slipped the electronics into the breast pocket with the pocket square. I sewed the QT Py and battery holder to the inside top of the breast pocket so they're easy to access without fiddling.

![el_wire_tape_panel_suit_assembly.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/408/medium640/el_wire_tape_panel_suit_assembly.jpeg?1673215252)

![el_wire_tape_panel_suit_mostlymanaged.jpeg](https://cdn-learn.adafruit.com/assets/assets/000/117/410/medium640/el_wire_tape_panel_suit_mostlymanaged.jpeg?1673215364)

![](https://cdn-learn.adafruit.com/assets/assets/000/117/411/medium800/el_wire_tape_panel_suit_closeup.jpeg?1673215380)


## Guide Products

### nOOds - Flexible LED Filament - 3V 300mm long - Warm White

[nOOds - Flexible LED Filament - 3V 300mm long - Warm White](https://www.adafruit.com/product/5503)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they&nbsp;_are&nbsp;_good for...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5503)
[Related Guides to the Product](https://learn.adafruit.com/products/5503/guides)
### nOOds - Flexible LED Filament - 3V 300mm long - Red

[nOOds - Flexible LED Filament - 3V 300mm long - Red](https://www.adafruit.com/product/5506)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they are&nbsp;good for cool lighting...

In Stock
[Buy Now](https://www.adafruit.com/product/5506)
[Related Guides to the Product](https://learn.adafruit.com/products/5506/guides)
### nOOds - Flexible LED Filament - 3V 300mm long - Blue

[nOOds - Flexible LED Filament - 3V 300mm long - Blue](https://www.adafruit.com/product/5508)
Our favorite food when hacking on code or electronics is a hot bowl of noodles - and around NYC these are often called 'noods'! What we've got here are flexible LED noodles, in different lengths and colors. All are not good for eatin' but they are&nbsp;good for cool lighting...

In Stock
[Buy Now](https://www.adafruit.com/product/5508)
[Related Guides to the Product](https://learn.adafruit.com/products/5508/guides)
### Single CR2032 / 20mm Coin Cell Battery Holder with Switch

[Single CR2032 / 20mm Coin Cell Battery Holder with Switch](https://www.adafruit.com/product/4856)
This tiny coin cell battery holder is ideal for small portable or wearable projects. It holds one 20mm coin cell&nbsp;(also known as CR2032) in series to generate 3V nominal. 20mm coin cells are popular as they are used in keychain lights and remotes, so they are easy to get&nbsp;and fairly...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4856)
[Related Guides to the Product](https://learn.adafruit.com/products/4856/guides)
### 20mm Coin Cell Breakout w/On-Off Switch (CR2032)

[20mm Coin Cell Breakout w/On-Off Switch (CR2032)](https://www.adafruit.com/product/1871)
Simple but effective - this sewable breakout board has a CR2032 coin cell battery holder soldered on, an on/off switch and 0.1" pitch breakout pins for easy connecting. Great for powering very low-current projects, or adding a battery backup circuit to a real-time-clock or similar....

Out of Stock
[Buy Now](https://www.adafruit.com/product/1871)
[Related Guides to the Product](https://learn.adafruit.com/products/1871/guides)
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
### Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25

[Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25](https://www.adafruit.com/product/2780)
ΩMG! You're not going to be able to resist these handy resistor packs!&nbsp;Well, axially, they&nbsp;do all of the resisting for you!

This is a **25 Pack of 220Ω Resistors.** More specifically, they are **carbon film** , through-hole...

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Adafruit nOOds Überguide](https://learn.adafruit.com/noods-uberguide.md)
- [Gemma M0 Sheikah Pendant](https://learn.adafruit.com/gemma-m0-sheikah-pendant.md)
- [Glowing Beehive Hairdo Wig](https://learn.adafruit.com/glowing-beehive-hairdo-wig.md)
- [Pico W HTTP Server with CircuitPython](https://learn.adafruit.com/pico-w-http-server-with-circuitpython.md)
- [Infinity Mirror Collar](https://learn.adafruit.com/infinity-mirror-collar.md)
- [CircuitPython on the Arduino Nano RP2040 Connect](https://learn.adafruit.com/circuitpython-on-the-arduino-nano-rp2040-connect.md)
- [No-Code IoT Humidity and Temperature Sensor with Adafruit IO WipperSnapper](https://learn.adafruit.com/no-code-humidity-and-temp-tracker.md)
- [MagTag Dishwasher Status](https://learn.adafruit.com/magtag-dishwasher-status.md)
- [May Pad Macropad with the KB2040, KMK, and CircuitPython](https://learn.adafruit.com/maypad-macropad-with-the-kb2040-kmk-and-circuitpython.md)
- [Digital Inputs with Adafruit IO WipperSnapper](https://learn.adafruit.com/digital-inputs-with-adafruit-io-wippersnapper.md)
- [Breakout Game on the Metro RP2350 and Fruit Jam](https://learn.adafruit.com/breakout-game-on-metro-rp2350-and-fruit-jam.md)
- [LED Noodle Holiday Tree](https://learn.adafruit.com/led-noodle-tree.md)
- [Glowing Scale Armor](https://learn.adafruit.com/glowing-scale-armor.md)
- [nOOds LED CV Signal Visualizers](https://learn.adafruit.com/noods-led-synth-cv-visualizers.md)
- [Princess Peach LED Crown](https://learn.adafruit.com/bowsette.md)
- [LED Noodle Snowflake](https://learn.adafruit.com/led-noodle-snowflake.md)
