# Interior Purse Light

## Overview

https://www.youtube.com/watch?v=7kxZSeXewrQ

Trying to find something in your purse at a dark restaurant or party? What a pain! Make it easy to see what's in your bag with LED sequins, GEMMA, and conductive hook & loop  
  
This beginner level e-textiles project has you sewing with conductive thread and loading a simple Arduino program onto the GEMMA microcontroller. This project is perfect for use with the [GEMMA Sequin Starter Pack](http://www.adafruit.com/product/1850)! Just add [hook & loop](http://www.adafruit.com/product/1324 "Link: http://www.adafruit.com/product/1324").&nbsp;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;

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/016/253/medium800/gemma_interior-purse-light-19.jpg?1398809899)

Gather up the following parts & tools:

- [Gemma M0](https://www.adafruit.com/product/3501)&nbsp;or&nbsp;[GEMMA v2 wearable microcontroller](http://www.adafruit.com/products/1222 "Link: http://www.adafruit.com/products/1222")
- (Optional): build on the:&nbsp;[GEMMA Starter Pack](http://www.adafruit.com/products/1657)&nbsp;or&nbsp;[GEMMA Sequin Starter Pack](http://www.adafruit.com/product/1850 "Link: http://www.adafruit.com/product/1850")
- [Conductive hook & loop](http://www.adafruit.com/product/1324)
- Purse or backpack
- Scissors
- Clear nail polish
- USB cable
- Computer with Adafruit Arduino software

![](https://cdn-learn.adafruit.com/assets/assets/000/016/245/medium800/gemma_interior-purse-light-00.jpg?1398809634)

![](https://cdn-learn.adafruit.com/assets/assets/000/016/244/medium800/gemma_interior-purse-light-20.jpg?1398809433)

# Interior Purse Light

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/016/243/medium800/gemma_purselight-diagram.jpg?1398809402)

Info: 

Click to enlarge! Five LED sequins are sewn in parallel to GEMMA's D2 and GND pads.  
  
Conductive hook & loop is sewn to GND and D1 pads. In the Arduino program D1's internal pullup resistor is activated.

# Interior Purse Light

## Stitch Sequins

![](https://cdn-learn.adafruit.com/assets/assets/000/016/251/medium800/gemma_interior-purse-light-01.jpg?1398809866)

Clean off your work space and turn your bag inside out. Arrange the components on your bag to get an idea of where you'd like to position everything, referring to the circuit diagram.

Thread a needle with conductive thread and stitch around GND on GEMMA. Tie a knot and continue stitching toward the first sequin. Stitch around its negative pad (marked "-") a few times, then continue down the line, stitching to each sequin.  
  
Tie a knot at the last pixel (we chose pink for extra flair), and cut the thread tail long.

![gemma_interior-purse-light-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/246/medium640/gemma_interior-purse-light-02.jpg?1398809670)

![gemma_interior-purse-light-03.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/255/medium640/gemma_interior-purse-light-03.jpg?1398810013)

![gemma_interior-purse-light-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/256/medium640/gemma_interior-purse-light-04.jpg?1398810098)

Repeat the last step on the other side of the pixels, stitching them all to D2 on GEMMA.

![gemma_interior-purse-light-05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/258/medium640/gemma_interior-purse-light-05.jpg?1398810376)

![gemma_interior-purse-light-06.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/262/medium640/gemma_interior-purse-light-06.jpg?1398811079)

![gemma_interior-purse-light-07.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/265/medium640/gemma_interior-purse-light-07.jpg?1398811259)

Pull your thread tails taught and dab on a small amount of clear nail polish-- it should only touch the knot, not the pads of GEMMA or the sequins.  
  
For more tips on working with conductive thread, check out our [Conductive Thread guide](https://learn.adafruit.com/conductive-thread).  
  
When dry, snip the thread tails short.

![gemma_interior-purse-light-09.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/266/medium640/gemma_interior-purse-light-09.jpg?1398811455)

![gemma_interior-purse-light-10.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/267/medium640/gemma_interior-purse-light-10.jpg?1398811652)

![](https://cdn-learn.adafruit.com/assets/assets/000/016/269/medium800/gemma_interior-purse-light-11.jpg?1398811796)

Double check you don't have any rogue bits of thread hanging out anywhere, and that any stray bits have been cleaned up.&nbsp;

# Interior Purse Light

## Add Tape

Thread your needle with another length of conductive thread, and stitch to GND on GEMMA again. Tie a knot, then stitch over to one piece of conductive hook & loop.  
  
This stuff can be difficult to sew through, so you may want to have a pair of pliers handy for helping to grasp the needle.  
  
Since the hook&loop will pull at it's mating piece, stitch it very securely to the bag, around all four edges. Then tie it off and cut the tail.

![gemma_interior-purse-light-12.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/248/medium640/gemma_interior-purse-light-12.jpg?1398809705)

![gemma_interior-purse-light-13.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/254/medium640/gemma_interior-purse-light-13.jpg?1398810003)

Stitch around pad D1 on GEMMA with a new piece of conductive thread, then stitch all the way around the opening of the bag to the other side. Repeat the hook & loop securing on this side, making sure the two pieces are aligned.

![gemma_interior-purse-light-14.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/257/medium640/gemma_interior-purse-light-14.jpg?1398810173)

![gemma_interior-purse-light-15.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/259/medium640/gemma_interior-purse-light-15.jpg?1398810331)

Jump to the [CircuitPython Code](../../../../interior-purse-light/circuitpython-code) or [Arduino Code](../../../../interior-purse-light/arduino-code) section for programming your Gemma.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/016/260/medium800/gemma_interior-purse-light-16.jpg?1398810428)

![](https://cdn-learn.adafruit.com/assets/assets/000/016/263/medium800/gemma_interior-purse-light-17.jpg?1398810698)

Now your bag should light up when it's open! If you can't see into the bag when it's shut, use an alligator clip or piece of wire to connect the two pieces of hook & loop to see if the light shut off. When you've verified the sensor is working properly, you can disconnect the USB cable and connect up a coincell battery pack for taking your project portable!

![](https://cdn-learn.adafruit.com/assets/assets/000/016/264/medium800/gemma_interior-purse-light-18.jpg?1398811200)

# Interior Purse Light

## Arduino Code

Info: 

Grab the modified "Button" example sketch below and load it onto GEMMA:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Interior_Purse_Light/Interior_Purse_Light.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.

# Interior Purse Light

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/047/503/medium800/adafruit_gemma_gemma-cp.jpg?1508706695)

 **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/Interior_Purse_Light/code.py

# Interior Purse Light

## Use It!

![](https://cdn-learn.adafruit.com/assets/assets/000/016/247/medium800/gemma_interior-purse-light-19.jpg?1398809668)

Take your purse to a dark club or party, but always be able to see what's inside! Avoid getting the circuit wet while the battery is connected, and remove the battery pack for laundering.  
  
Depending on your circuit placement, you'll also have to watch out for metal objects that could short your GEMMA. Happy stitching!

![](https://cdn-learn.adafruit.com/assets/assets/000/016/252/medium800/gemma_interior-purse-light-20.jpg?1398809867)


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

In Stock
[Buy Now](https://www.adafruit.com/product/1222)
[Related Guides to the Product](https://learn.adafruit.com/products/1222/guides)
### Adafruit Gemma Sequin Starter Pack

[Adafruit Gemma Sequin Starter Pack](https://www.adafruit.com/product/1850)
Make your wearables glow with the **GEMMA sequin pack**! This GEMMA parts pack makes it easy to add light to your wearables. It comes with thread, needles, a holder for 2 x CR2032 coin cell batteries, a GEMMA sewable microcontroller, and warm white Adafruit LED Sequins. This pack...

In Stock
[Buy Now](https://www.adafruit.com/product/1850)
[Related Guides to the Product](https://learn.adafruit.com/products/1850/guides)
### Conductive Hook & Loop Tape - 3" long

[Conductive Hook & Loop Tape - 3" long](https://www.adafruit.com/product/1324)
Conductive hook & loop tape is just like the stuff you've seen on jackets, clothes, shoes, and bags, but is coated with silver to make it fully conductive. Originally this was designed to the manufacture of static-safe clothing, but its great for wearable applications as well. For...

In Stock
[Buy Now](https://www.adafruit.com/product/1324)
[Related Guides to the Product](https://learn.adafruit.com/products/1324/guides)
### Adafruit LED Sequins - Warm White - Pack of 5

[Adafruit LED Sequins - Warm White - Pack of 5](https://www.adafruit.com/product/1758)
Sew a little sparkle into your wearable project with an Adafruit LED Sequin. These are the kid-sister to our popular [Flora NeoPixel](http://www.adafruit.com/products/1260), they only show a single color and they don't have digital control, but that makes them smaller easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1758)
[Related Guides to the Product](https://learn.adafruit.com/products/1758/guides)
### 2 x CR2032 Coin Cell Battery Holder - 6V output - On/Off switch

[2 x CR2032 Coin Cell Battery Holder - 6V output - On/Off switch](https://www.adafruit.com/product/783)
This tiny coin cell battery holder is ideal for small portable or wearable projects. It holds two 20mm coin cells (2032 or CR2032 are the most popular size) in series to generate 6V nominal. (If you want only 3V, we suggest sticking a crumpled piece of tin foil in one of the slots.) 20mm coin...

In Stock
[Buy Now](https://www.adafruit.com/product/783)
[Related Guides to the Product](https://learn.adafruit.com/products/783/guides)
### Stainless Thin Conductive Thread - 2 ply - 23 meter/76 ft

[Stainless Thin Conductive Thread - 2 ply - 23 meter/76 ft](https://www.adafruit.com/product/640)
After months of searching, we finally have what we consider to be the ultimate conductive thread. It's thin, strong, smooth, and made completely of 316L stainless steel. Once you start working with this thread you'll quickly agree its optimal for any wearables work!  
  
This...

In Stock
[Buy Now](https://www.adafruit.com/product/640)
[Related Guides to the Product](https://learn.adafruit.com/products/640/guides)
### Needle set - 3/9 sizes - 20 needles

[Needle set - 3/9 sizes - 20 needles](https://www.adafruit.com/product/615)
Mighty needles, sew like the wind! This needle set is the only one you'll need for any sort of hand sewing, especially using our conductive thread and wearable electronics parts.  
  
Each pack contains 20 gold-eye sharps, with eye sizes ranging from #3 (1.75" long) to #9...

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

## Related Guides

- [Neopixel Jewel 10 Minute Necklace](https://learn.adafruit.com/10-minute-neopixel-necklace.md)
- [Color-sensor Driven NeoPixel Dress](https://learn.adafruit.com/color-sensor-driven-neopixel-dress.md)
- [DIY Lego LED Bricks](https://learn.adafruit.com/diy-lego-led-bricks.md)
- [LED Friendship Bracelet](https://learn.adafruit.com/nautical-led-bracelet.md)
- [LED Sequin Bow Tie](https://learn.adafruit.com/led-sequin-bowtie.md)
- [CircuitPython Basics: Digital Inputs & Outputs](https://learn.adafruit.com/circuitpython-digital-inputs-and-outputs.md)
- [Animated NeoPixel Glow Fur Scarf](https://learn.adafruit.com/animated-neopixel-gemma-glow-fur-scarf.md)
- [3D Printed Unicorn Horn](https://learn.adafruit.com/3d-printed-unicorn-horn.md)
- [Your Very First Circuit Sculpture](https://learn.adafruit.com/first-simple-circuit-sculpture.md)
- [Adafruit LED Sequins](https://learn.adafruit.com/adafruit-led-sequins.md)
- [Techno-Tiki RGB LED Torch](https://learn.adafruit.com/techno-tiki-rgb-led-torch.md)
- [FLORA and GEMMA ICSP](https://learn.adafruit.com/flora-and-gemma-isp.md)
- [Adafruit Arduino IDE Setup](https://learn.adafruit.com/adafruit-arduino-ide-setup.md)
- [EL Bowtie](https://learn.adafruit.com/el-bowtie.md)
- [Digital LED Belt](https://learn.adafruit.com/digital-led-belt.md)
