These sample codes were written for the Textile Game Controller Jam.
These samples provide basic input for digital switches, analog sensors, and capactive sensing.
All of the examples use an Adafruit Circuit Playground Classic. An overview of the Circuit Playground Classic can be found here.
- Materials Used
- Digital Switch
- Analog Sensor
- Capactive Sensing - Conductive Fabric
- Capactive Sensing - Felting
- Capactive Sensing - Embroidery
- Adafruit Circuit Playground
- Conductive Thread
- Conductive Fabric
- Conductive Wool Fiber
- Velostat
- 10K Ohm Resistors
- Cotton Thread
- Sewing Needles
- Needle Threader
- Industrial Felt
- Craft Felt
- Sponge
- Felting Needles
- Coloured Wool Fiber
- Silicone Finger Protector
- Embroidery Hoop
- Embroidery Needle (wide-eyed needle)
- Embroidery Floss
- Cotton Fabric
Follow along on the video tutorial "How to Make an E-Textile Digital Switch"
Sample Code for Digital Switch
The code contains 1 digital switch which lights up the LED ring when activated. This sample uses conductive fabric & thread. Pins 1 & GND are used in this code.
Follow along on the video tutorial "How to Make an E-Textile Analog Sensor"
The code contains 1 analog sensor. The amount of lights that turn on is related to the reading of the pressure sensor. If high force is applied onto the sensor, the most of the lights will turn on. If light pressure is applied, only a few will turn on.
This sample uses velostat, conductive fabric, conductive thread, 10K ohm resistor, and felt. This code uses Physical Pins 12, GND, & 3.3V
Follow along on the video tutorial "How to Make an Capacitive Sensor Using E-Textile Materials"
Sample Code for Capactive Touch with Fabric
The code contains 1 capacitive sensor which lights up when touched. A piece of conductive fabric is connected to pin 0 using conductive thread.
Follow along on the video tutorial "How to Felt an E-Textile Capacitve Sensor"
Sample Code for Capactive Touch with Felting
The code contains 2 capactive touch sensors. Conductive thread & conductive felt are used to connect to capactive touch sensing pin 9 (the felted top of the ice cream cone) & pin 6 (the felted cone bottom).
An felted circuit used conductive thread & conductive felt to connect the sensor to the capactive pin.
Follow along on the video tutorial "How to Embroider an E-Textile Capacitve Sensor"
Sample Code for Capactive Touch with Embroidery
The code contains 2 capactive touch sensors. Conductive thread is used to connect to capactive touch sensing pin 2 (the embroidered lightbulb) & pin 9 (the embroidered LED).
An embroidered circuit used conductive thread to connect the sensor to the capactive pin.