5. E-textiles¶
Research¶
Ideation¶
Fabric sensors¶
Digital switch¶
A snapfit/ press button attached using either fine copper wire or with conductive thread acts as an On-Off digital switch.
Pressure sensor 1 - Squeezee¶
A steel mesh pot-scrubber, when squeezed, increases contact between it's strands, and drops in resistance. This change in resistance can be used to infer pressure.
Pressure Sensor 2 - Velostat¶
Slider 1 - Bead with conductive fabric¶
(pressfit buttons version)
Slider 2 - Bead with conductive fabric¶
(aglet version)
Basic Analog Sensor code¶
Can be used for any analog sensor. The sensor creates a voltage drop between the 5V and the A0 input pin, and the 10k resistor prevents noise on the A0 pin by grounding it when not receiving an input.
// Analog Sensor Read
int sensorPin = A1;
int sensorValue = 0;
void setup() {
Serial.begin(9600);
pinMode(sensorPin, INPUT);
}
void loop() {
sensorValue = analogRead(sensorPin);
// Serial.print("Sensor value: ");
Serial.println(sensorValue);
delay(500);
}
Analog Sensor Connections¶
Sensor terminals - 5V and A0
10k resistor - A0 and Gnd
Serial output¶
This is fairly random, I am still trying to debug what is wrong here.
Hard soft connections¶
-
Copper tape + Pressfit buttons + Conductive thread
Project¶
Pressure sensor based NeoPixel lightup I wanted to use the squeeze or pressure sensor as an input, and based on the level of the input, light up neoixels.
The mapping would be Pressure -> Brightness OR Pressure -> Number of LEDs
Eventually I settled on creating the White Tree of Gondor, defined by Neopixel LEDs.
The tree motif would be on a forearm covering vambrace, while the sensor would be in the palm of the glove, to be activated by squeezing. The microcontroller, currently an Arduino Uno, would be the Xiao RP2040, stitched onto the back of the hand.
The vambrace would have aglets to easily lace it up onto the forarm.
Concept¶

I found the image at the very end of the week, of the same concept but in leatherwork !
Image credits : Grommet's leathercraft, Black Raven Armoury
Neopixel Tree sketch
XIAO on fabric
neopixels on perfboard 0 attachment plan
Process¶
Code for basic Neopixel test :
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6 // Pin connected to the NeoPixel data line
#define LED_COUNT 4 // Number of NeoPixels in the strip
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin(); // Initialize the NeoPixel strip
strip.show(); // Turn OFF all pixels at startup
strip.setBrightness(100); // (optional) set brightness 0–255
}
void loop() {
// Simple color cycle: red → green → blue
colorWipe(strip.Color(255, 0, 0), 100); // Red
colorWipe(strip.Color(0, 255, 0), 100); // Green
colorWipe(strip.Color(0, 0, 255), 100); // Blue
}
// Helper function: fill the strip color by color
void colorWipe(uint32_t color, int wait) {
for (int i = 0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, color);
strip.show();
delay(wait);
}
}









































