13. Skin Electronics¶
This week, luckily but sadly was the last one for this 4th edition of FabricAdemy 2020/21.
our mood was like...
Research¶
As we were in the Christmas' week we planned to have a "Skin masquerade party" ! So in that spirit, I was inspired by Ancient Saturnalias' festivities.
In Ancient Rome were dedicated to Saturn and the "Golden Age", but in the pagan tradition were celebrations for the "Winter Solstice".
After some inputs that didn't convinced me,
finally I decide to REUSE two old masks, that I've already used for BioMaterials, so "V" and "Salvador" were my buddies in this Skin_Electronics journey! 👹 👺
How to make a skin electronic mask¶
This proejct shows the interaction between human skin and electronic, through a gelatine biomaterial mask. I've used 2 Capacitive sensors attached to neopixel and 1 output buzzer, all programmed via ATtiny 85.
- Musical inspiration for the Winter Solstice Ritual -
Arduino Code¶
My aim was to light up the 4 neopixels and activate the buzzer (with 2 different sounds & colors for each sensor), everytime the capacitive sensors were touched.
violet = right sensor ON orange = left sensor ON green= both sensors ON
Sounds & Lights Code
include ¶
include ¶
define LED_PIN 1¶
define LED_COUNT 4¶
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
uint32_t off = strip.Color(0, 0, 0);
CapacitiveSensor cs_4_2 = CapacitiveSensor(4, 2); // 10M resistor between pins 4 & 2, pin 2 is sensor pin, add a wire and or foil if desired CapacitiveSensor cs_4_3 = CapacitiveSensor(4, 3); // 10M resistor between pins 4 & 6, pin 6 is sensor pin, add a wire and or foil
int thr = 100; int brightness = 50; int BStep = 2; int StepDirection = 1;
void setup() { //cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF); // turn off autocalibrate on channel 1 - just as an example
strip.begin(); strip.show(); // Turn OFF all pixels ASAP strip.setBrightness(20); // Set BRIGHTNESS to about 1/5 (max = 255) pinMode(0, OUTPUT); }
void loop() { long total1 = cs_4_2.capacitiveSensor(30); long total2 = cs_4_3.capacitiveSensor(30);
if (total1 > thr & total2 < thr) { strip.fill(strip.Color(255, 128, 0)); // Orange tone(0, 589); BStep = 20; } else if ( total1 < thr & total2 > thr) { strip.fill(strip.Color(76, 0, 153)); //Violet tone(0, 192); BStep = 30; } else if ( total1 > thr & total2 > thr) { strip.fill(strip.Color(0, 153, 76)); //Green tone(0, 1000); BStep = 5; } else { strip.fill(strip.Color(255, 255, 255)); //White noTone(0); BStep = 2; } strip.show(); strip.setBrightness(brightness); brightness = brightness + BStep * StepDirection; if (brightness >= 100 or brightness <= 10) { StepDirection = StepDirection * -1; } delay(50); }