Purse Light with GEMMA & LED Sequins

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! Just add hook & loop. Before you get started, follow the Gemma M0 guide or the Classic Introducing GEMMA guide

Gather up the following parts & tools:

Circuit Diagram

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.

Stitch Sequins

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.

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

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 my Conductive Thread guide.

When dry, snip the thread tails short.

Double-check you don’t have any rogue bits of thread hanging out anywhere, and that any stray bits have been cleaned up. 

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 its mating piece, stitch it very securely to the bag, around all four edges. Then tie it off and cut the tail.

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.

Arduino Code

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

// constants won't change. They're used here to 
// set pin numbers:
const int buttonPin = 1;     // the number of the pushbutton pin
const int ledPin =  2;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);      
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT_PULLUP);     

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    // turn LED on:    
    digitalWrite(ledPin, HIGH);  
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW); 

From the Tools→Board menu, select the device you are using:

  • Adafruit Gemma M0
  • Adafruit Gemma 8 MHz 

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.

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.

Use It!

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!

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!

Originally posted on Adafruit

If you like this post, you may be interested in some of my others:

Thanks for following along! To keep up with what I’m working on, follow me on YouTubeInstagramTwitterPinterest, and subscribe to my newsletter.

%d bloggers like this: