Interior Purse Light. Created by Becky Stern. Last updated on :41:08 PM UTC

Similar documents
Adafruit LED Sequins. Created by Becky Stern. Last updated on :02:00 AM UTC

NeoPixel Ring Bangle Bracelet

Chirping Plush Owl Toy

Adafruit LED Sequins. Created by Becky Stern. Last updated on :00:06 PM EST

Light-Up Angler Fish Embroidery

Sewable NeoPixels. Created by Becky Stern. Last updated on :50:14 PM EDT

Jewel Hair Stick. Created by Leslie Birch. Last updated on :47:17 PM UTC

Mystical LED Halloween Hood

GPS Logging Dog Harness

NeoPixel LED Cortana Costume

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :42:16 PM UTC

NeoPixel Punk Collar. Created by Becky Stern. Last updated on :41:18 PM UTC

Interactive Gift Box. Created by codingpro. Last updated on :47:40 AM UTC

FLORA TV-B-Gone. Created by Becky Stern. Last updated on :32:57 PM UTC

Magical Mistletoe. Created by Leslie Birch. Last updated on :45:29 PM UTC

FLORA and GEMMA ICSP. Created by Becky Stern. Last updated on :30:55 PM EST

Bunny Ears with MakeCode

Trinket-Powered Conference Room Occupancy Display

Arduino Lesson 6. Digital Inputs

Infinity Mirror Valentine's Candy Box

Clockwork Goggles. Created by John Park. Last updated on :03:10 PM UTC

FLORA Pixel Brooch. Created by Becky Stern. Last updated on :19:07 PM EST

Cyberpunk Spikes. Created by Becky Stern. Last updated on :07:06 PM UTC

NeoPixie Dust Bag with Circuit Playground Express

Stumble-Bot. Created by Dano Wall. Last updated on :04:06 AM UTC

Android GBoard Morse Code Control with Circuit Playground Express

Celebration Spectacles

Trash Panda. Created by Dano Wall. Last updated on :30:46 AM UTC

NeoPixel Basketball Hoop

Circuit Playground Digital Input

Mystery Box: NeoMatrix Mk I

'Sup Brows. Created by Kate Hartman. Last updated on :52:04 PM UTC

Snake Charmer Box. Created by Dano Wall. Last updated on :07:25 PM UTC

Adabot Operation Game

Alohamora Bottle. Created by Erin St Blaine. Last updated on :58:53 PM UTC

Adafruit IO Basics: Digital Input

Easy Sparkle Pocket T-Shirt

Coffee Detonator: The TNT Plunger Grinder

Bike Wheel POV Display

Crickit Dancing Marionette Kit Created by Dano Wall. Last updated on :03:11 PM UTC

Getting Started with FLORA

Getting Started with FLORA

Adafruit Capacitive Touch Sensor Breakouts

Neon LED Signs. Created by John Park. Last updated on :11:09 PM UTC

Getting Started with FLORA

LED Breath Stats Mask

Adafruit APDS9960 breakout

Wind Blowing Emoji Prop

Joy Featherwing. Created by Dean Miller. Last updated on :03:07 PM UTC

Feather Weather Lamp. Created by Ruiz Brothers. Last updated on :54:26 PM UTC

Portable Apple Watch Charger

Flora Brake Light Backpack

Data Logging with Feather and CircuitPython

Sparkle Skirt. Created by Becky Stern. Last updated on :48:58 PM UTC

ISS Pin. Created by Leslie Birch. Last updated on :27:30 PM UTC

Cup o' Sound. Created by Becky Stern. Last updated on :30:06 PM EST

Reindeer Mask with Animated Eyes

Glowing Star Chuck Taylor Sneakers

Solar Boost Bag. Created by Becky Stern. Last updated on :44:55 PM UTC

Trinket NeoPixel LED Longboard

Toy Car Speed Timer. Created by Kirby Griese. Last updated on :13:49 PM UTC

TRON Bag. Created by Becky Stern

Adafruit IO Basics: Digital Output

Crawling Animatronic Hand

Slider Crank Mechanism -- from Cardboard and Craft Sticks

Pushrod Garage. Created by John Park. Last updated on :07:30 PM UTC

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

Circuit Playground Express Laser Tag

NeoMatrix 8x8 Word Clock

Bandolier of Light. Created by Becky Stern. Last updated on :16:17 PM EST

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

3d Printed Neopixel Tactile Switch Buttons

NeoPixel Manicure. Created by Sophy Wong. Last updated on :50:38 PM UTC

Adafruit AM2320 Sensor

CircuitPython Media Dial

Adafruit GPIO Expander Bonnet for Raspberry Pi Created by Kattni Rembor. Last updated on :12:47 PM UTC

Luminous LED Flowers. Created by Becky Stern. Last updated on :47:44 PM UTC

Adafruit CCS811 Air Quality Sensor

LED Stego Flex Spike Hoodie

LED Eyes. Created by Ruiz Brothers. Last updated on :50:55 AM UTC

MLX90393 Wide-Range 3-Axis Magnetometer

PyPortal NeoPixel Color Picker Created by Kattni Rembor. Last updated on :42:41 PM UTC

Milk Jug Glow Skull. Created by John Park. Last updated on :28:36 PM UTC

Adafruit AMG8833 8x8 Thermal Camera Sensor

TSL2561 Luminosity Sensor

Adafruit Color Sensors

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Guardian Shield+ Zelda Breath of the Wild

Adafruit IO Basics: Analog Input

Pinball Controller for ipad

Adafruit 8x16 LED Matrix FeatherWing

3D Printed Camera LED Ring

Adafruit DRV2605 Haptic Controller Breakout

Flora Wearable GPS. Created by Becky Stern. Last updated on :32:36 PM UTC

Monochrome OLED Breakouts

NeoPixel Bike Light. Created by Ruiz Brothers. Last updated on :43:46 PM UTC

Ping Pong Ball Launcher

MCP Bit DAC Tutorial

Tent Lantern. Created by Timothy Reese. Last updated on :17:25 AM UTC

Con Badge with Circuit Playground Express

Transcription:

Interior Purse Light Created by Becky Stern Last updated on 2018-08-22 03:41:08 PM UTC

Guide Contents Guide Contents Overview Circuit Diagram Stitch Sequins Add Tape Arduino Code CircuitPython Code Use It! 2 3 5 6 11 15 16 18 Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 2 of 19

Overview 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 (https://adafru.it/dn1)! Just add hook & loop (https://adafru.it/dn2). Before you get started, follow the Gemma M0 guide (https://adafru.it/zxe) or the Classic Introducing GEMMA guide (https://adafru.it/e1v) This guide was written for the Gemma v2 board, but can be done with either the v2 or Gemma M0. We recommend the Gemma M0 as it is easier to use and is more compatible with modern computers! Gather up the following parts & tools: Gemma M0 (https://adafru.it/ytb) or GEMMA v2 wearable microcontroller (http://adafru.it/1222) (Optional): build on the: GEMMA Starter Pack (http://adafru.it/1657) or GEMMA Sequin Starter Pack (https://adafru.it/dn1) Conductive hook & loop (https://adafru.it/dn2) Purse or backpack Scissors Clear nail polish USB cable Computer with Adafruit Arduino software Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 3 of 19

Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 4 of 19

Circuit Diagram This diagram uses the original Gemma but you can also use the Gemma M0 with the exact same wiring! 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. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 5 of 19

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. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 6 of 19

Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 7 of 19

Repeat the last step on the other side of the pixels, stitching them all to D2 on GEMMA. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 8 of 19

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://adafru.it/dn3). When dry, snip the thread tails short. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 9 of 19

Double check you don't have any rogue bits of thread hanging out anywhere, and that any stray bits have been cleaned up. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 10 of 19

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. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 11 of 19

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. Jump to the CircuitPython Code (https://adafru.it/cd4) or Arduino Code (https://adafru.it/cd5) section for programming your Gemma. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 12 of 19

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! Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 13 of 19

Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 14 of 19

Arduino Code The Arduino code presented below works equally well on all versions of GEMMA: v2 and M0. But if you have an M0 board, consider using the CircuitPython code on the next page of this guide, no Arduino IDE required! 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. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 15 of 19

CircuitPython Code GEMMA M0 boards can run CircuitPython a different approach to programming compared to Arduino sketches. In fact, CircuitPython comes factory pre-loaded on GEMMA 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 Adafruit GEMMA M0 guide (https://adafru.it/z1b). These directions are specific to the M0 GEMMA board. The original GEMMA with an 8-bit AVR microcontroller doesn t run CircuitPython for those boards, use the Arduino sketch on the Arduino code page of this guide. Below is CircuitPython code that works 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 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, entirely replacing its contents (don t mix it in with lingering bits of old code). When you save the file, the code should start running almost immediately (if not, see notes at the bottom of this page). If GEMMA M0 doesn t show up as a drive, follow the GEMMA M0 guide link above to prepare the board for CircuitPython. Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 16 of 19

import time import board from digitalio import DigitalInOut, Direction, Pull button = DigitalInOut(board.D1) button.direction = Direction.INPUT button.pull = Pull.UP led = DigitalInOut(board.D2) led.direction = Direction.OUTPUT while True: if button.value: led.value = True # check if the pushbutton is pressed. else: led.value = False # turn LED off time.sleep(0.01) # debounce delay Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 17 of 19

Use It! 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! Adafruit Industries https://learn.adafruit.com/interior-purse-light Page 18 of 19

Adafruit Industries Last Updated: 2018-08-22 03:41:04 PM UTC Page 19 of 19