The tired tactile button

Tactile plushy button

Components and machines are inanimate objects unable to feel emotions, but what if that was not the case? What if components could get sleepy, angry, bored, etc.? I decided to focus on the tiredness, and to convey this feeling, I created a circuit where an LED gets dimmer the more a button is pressed. The more the switch is used, the more it gets tired. Once the switch is "exhausted," the LED turns off, and we are forced to wait until the button has rested and the LED is back at full brightness to start operating the circuit again.

The plushy button:

The first part of the project is the button, a perfectly scaled and functioning version of a temporary switch made like a plush. This was done because, as humans, we generally like to interact with soft objects when we are tired and want to sleep. The switch is made of felt, stainless steel thread, copper taffeta, and silver tape.

The circuit:

This is a simple circuit made of chained stitched copper thread and Arduino Nana Every a couple of resistors, one LED, and snap buttons. Everything is powered by the 3 3.3V coin cells arranged in series.

It was quite challenging to chain stitch this relatively compact circuit as there was not enough space to maneuver the needle.

Snaps buttons are used to connect the LED on the top cover with the circuit underneath.

int buttonPin = 12;
int LEDPin = 3;
int buttonVal;

unsigned int LEDbright = 0;
int dt = 500;
int fdt = 60000;
unsigned long whenButtonWasTouchedMs = 0;

void setup() {
  // put your setup code here, to run once:                                                           
  pinMode(buttonPin, INPUT);

  pinMode(LEDPin, OUTPUT);

  Serial.begin(9600);
}

void loop() {
  //static unsigned long whenButtonWasTouchedMs = 0;
  buttonVal = digitalRead(buttonPin);

  Serial.print("Button = ");
  Serial.print(buttonVal);
  Serial.print(", ");

  delay(dt);

  if (buttonVal == 1) {
    LEDbright = LEDbright + 20;
    whenButtonWasTouchedMs = millis();
    
  }

  if (LEDbright > 255) {
    LEDbright = 255;
    delay(dt);
  } 
  Serial.println(LEDbright);

  unsigned long afterButtonWasTouchedMs = millis() - whenButtonWasTouchedMs;

  if (afterButtonWasTouchedMs >= 60000) {
    LEDbright = 0;
  }    
  analogWrite(LEDPin, LEDbright);
}
  

Button code: