Wearables Guide

Introduction

CodeBug’s legs can be easily sewn to fabric. If you use conductive thread, you can connect sewable LEDs and buttons to the legs and use them in your programs.

You will need
CodeBug CodeBug
Micro USB cable
Computer
CR2032 battery
Conductive thread
Sewable buttons
Sewable LEDs

2 Questions
  • Is there a reccomended conductive thread? I'm running out! Stephen De Gabrielle @ Jan. 16, 2016, 12:40 p.m.


    Answer this question:

  • Where do I purchase sewable buttons and LEDs? This is my first wearable. I would also be curious to know what kind of conductive thread that I would need. — basnyd @ Feb. 2, 2016, 2:11 a.m.


    Answer this question:

  • Ask a new question:

Sewable LED

CodeBug’s legs can be used to turn LEDs on and off. In this mode the legs are called outputs.

  • Thread your needle (get an adult to help you).

  • Tie a knot in at the other end.

  • Place your CodeBug on your fabric, face up.

  • Pierce the fabric with the needle from the underside of the fabric, up through the PWR leg then down through the fabric on the other side of the leg.

  • Repeat this 5 times so your thread has a good connection with the leg and making sure it will hold CodeBug in place.

  • Sew up and down through the fabric until you reach the position where you want your LED to go.

Sew the positive side of the LED (with the plus symbol) to the PWR leg on CodeBug. Then sew the negative end of the LED (with the minus symbol) to leg 0.

You may wish to sew the legs on the opposite side of CodeBug as well to make sure it is held to your fabric.


1 Question
  • deleted


    Answer this question:

  • I have tried this using a sewable LED form Adafruit - a neopixel v2 but it doesn't work. Do I need a specific type of sewable LED? Kathy Olsson @ Nov. 25, 2015, 8:05 a.m.


    Neopixels are full-colour (RGB) LEDs and require you to send data to them (and also need to be run at 5 volts, so they won't work with a coin battery). For this activity just use single colour LEDs (that work around 3 volts). Thomas Macpherson-Pope @ Nov. 25, 2015, 10:16 a.m.

    Answer this question:

  • Ask a new question:

Control your LED

Now that your LED is all sewn up and connected to CodeBug, you can write a program to flash it on and off.

Follow the tutorial below to create your program.


  • Ask a new question:

Sewable Button

CodeBug’s legs are very sensitive, they can feel electricity passing through them. In this mode CodeBug’s legs are called inputs.

Buttons and switches work by controlling whether two contacts are connected or not. When the button is pushed, or the switch flicked on, the two sides are connected and electricity can flow, but in the off state no electricity will flow.

Sew your buttons in the same way you sewed the LEDs. Sew one ring of the button to the GND leg on CodeBug and the other ring to the leg 1 on CodeBug.


  • Ask a new question:

Using your button

With your button sewn to the fabric, you can make programs that have user interaction.

Follow the tutorial below to create your program.


  • Ask a new question:

What next?

Add more sewable LEDs and buttons to your project and try make a game! Share pictures of your project with everyone.


  • Ask a new question:

Back to top