Skip to content

12. Skin Interfaces

Initial thoughts

weekly assignment

Check out the weekly assignment here

Research and inspiration

get inspired!

Check out and research alumni pages to betetr understand how to document and get inspired

describe what you see in this image, see code to adjust width and alignment

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."

describe what you see in this image

centered image with credits/reference

Caption for the left image

Caption for the right image

Tools


Process and workflow

describe what you see in this image

Making a Stretch sensor

const int stretchPin = A7;

void setup() {
  Serial.begin(9600);
  pinMode(stretchPin, INPUT);
}

void loop() {
  int stretchValue = analogRead(stretchPin);

  Serial.println(stretchValue);

  delay(50);
}

Adding capacitive touch sensor

// Pin definitions
const int stretchPin = A7;
const int sendPin = A9;
const int receivePin = A10;

int stretchValue = 0;
long touchValue = 0;

void setup() {
Serial.begin(9600);

pinMode(stretchPin, INPUT);
pinMode(sendPin, OUTPUT);
pinMode(receivePin, INPUT);

digitalWrite(sendPin, LOW);
}

void loop() {

// Read analog stretch sensor
stretchValue = analogRead(stretchPin);

// Read capacitive touch sensor
touchValue = readCapacitiveTouch();

// Display both sensor values
Serial.print("Stretch:");
Serial.print(stretchValue);
Serial.print("\t");

Serial.print("Touch:");
Serial.println(touchValue);

delay(50);
}

// Capacitive touch measurement function
long readCapacitiveTouch() {

long total = 0;

for (int i = 0; i < 30; i++) {

// Discharge the sensor
digitalWrite(sendPin, LOW);
pinMode(receivePin, OUTPUT);
digitalWrite(receivePin, LOW);

delayMicroseconds(10);

// Prepare receiver
pinMode(receivePin, INPUT);

// Start charging
unsigned long startTime = micros();
digitalWrite(sendPin, HIGH);

// Measure charging time
while (digitalRead(receivePin) == LOW) {
  if (micros() - startTime >= 5000) {
    break;
  }
}

total += micros() - startTime;
}

digitalWrite(sendPin, LOW);

return total;
}

Adding 1 output to the. stretch sensor

#include <Adafruit_NeoPixel.h>

// Pin definitions
const int stretchPin = A7;
const int sendPin = A9;
const int receivePin = A10;

// Built-in NeoPixel on Adafruit Flora
#define NEOPIXEL_PIN 8
#define NUMPIXELS 1

Adafruit_NeoPixel pixels(NUMPIXELS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);

int stretchValue = 0;
long touchValue = 0;

void setup() {
  Serial.begin(9600);

  pinMode(stretchPin, INPUT);
  pinMode(sendPin, OUTPUT);
  pinMode(receivePin, INPUT);

  digitalWrite(sendPin, LOW);

  // Initialize NeoPixel
  pixels.begin();
  pixels.setBrightness(50);
  pixels.clear();
  pixels.show();
}

void loop() {

  // Read analog stretch sensor
  stretchValue = analogRead(stretchPin);

  // Read capacitive touch sensor
  touchValue = readCapacitiveTouch();

  // Control NeoPixel based on stretch sensor
  if (stretchValue >= 600) {
    // Turn LED yellow
    pixels.setPixelColor(0, pixels.Color(255, 255, 0));
  } else {
    // Turn LED off
    pixels.clear();
  }

  pixels.show();

  // Display both sensor values
  Serial.print("Stretch:");
  Serial.print(stretchValue);
  Serial.print("\t");

  Serial.print("Touch:");
  Serial.println(touchValue);

  delay(50);
}

// Capacitive touch measurement function
long readCapacitiveTouch() {

  long total = 0;

  for (int i = 0; i < 30; i++) {

    // Discharge the sensor
    digitalWrite(sendPin, LOW);
    pinMode(receivePin, OUTPUT);
    digitalWrite(receivePin, LOW);

    delayMicroseconds(10);

    // Prepare receiver
    pinMode(receivePin, INPUT);

    // Start charging
    unsigned long startTime = micros();
    digitalWrite(sendPin, HIGH);

    // Measure charging time
    while (digitalRead(receivePin) == LOW) {
      if (micros() - startTime >= 5000) {
        break;
      }
    }

    total += micros() - startTime;
  }

  digitalWrite(sendPin, LOW);

  return total;
}

Results

Code


Weekly reflection

  • What did I learn? What did I personally find interesting or surprised me?
  • What would I do differently? If something "failed" do I know how else to tackle it now?"
  • How does this connect to my final project or my learning trajectory?
  • What are implications and possible applications, think also from the ethical or environmental aspect, how it could connect to your practice and project?

NuEval — final step

Go to NuEval and fill in the checklist, when not complete notify your instructor.


7. Recipes, Fabrication files & References