Skin electronics
To program ATTiny I used a designated programmer shield from Sparkfun. However it is possible without the shield, just using Arduino to send code to ATTiny.
Tiny AVR Programmer Hookup Guide by SparkfunPROGRAMMING AN ATTINY85 USING AN ARDUINO
// ATtiny85 and The Three LEDs
// Wokwi.com demo by Uri Shaked
#include
#define LED_PIN PB0
#define LED_PIN PB1
#define LED_PIN PB2
int value=0;
int treshold=150;
void setup() {
pinMode(PB0, OUTPUT);
pinMode(PB1, OUTPUT);
pinMode(PB2, OUTPUT);
pinMode(PB3, INPUT);
//Serial.begin(9600);
}
void loop() {
value = analogRead(PB3);
//Serial.println(value);
delay(100);
if (value >= treshold) {
digitalWrite(PB2, HIGH);
delay(600);
digitalWrite(PB2, LOW);
digitalWrite(PB1, HIGH);
delay(600);
digitalWrite(PB1, LOW);
digitalWrite(PB0, HIGH);
delay(600);
digitalWrite(PB0, LOW);
}
else{
delay(100) ;
}
}
Unfortunately, one of the diode legs was broken during the assembly process and since I didn't have a spare one, there are only two working diodes in this prototype. That's why the dalay time between lighting the diodes up is uneven as the code features three components. Three diodes were means to show a flow-like animation that is not possible with only two diodes, so eventually I did not achieve the effect I was aiming for and the animation looks fairly random
LINKS
- DuoSkin: rapidly prototyping on-skin user interfaces using skin-friendly materials
- Design and Fabrication of Soft Artificial Skin Using Embedded Microchannels and Liquid Conductors/a>
Back