13. Skin Electronics¶
Inspiration¶
For this project I wanted to make something which made a link with my final project, or something that can be used later on with my capsule collection, So I decided to make a headgear which is inpired from the cellular structures of our 3 best friends - Algae, Bacteria and Mycelium.
When Joseph, our lab instructor, showed us an example of acrylic 3D lamp, I got very inspired from that, as I always wanted to work with holograms and this was something like holograms.
Electronics¶
This week we learnt how to train ATtiny using arduino, so that we can use ATtiny and a battery for wearables or skin electronics.
Code used for the Neopixels¶
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN 6
// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 12
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
int sensor = A1;
int lecture = 0;
void setup() {
// put your setup code here, to run once:
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
// END of Trinket-specific code.
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
pinMode(sensor, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
lecture = analogRead(sensor);
lecture = constrain(lecture, 220, 800);
Serial.println(lecture);
if (lecture < 400) {
strip.fill(strip.Color(0,0,255), 0,12);
}
else if (lecture < 600) {
strip.fill(strip.Color(255,0,55), 0,12);
}
else{
strip.fill(strip.Color(255,255,255), 0,12);
}
strip.show();
delay(100);
}
void colorWipe(uint32_t color, int wait) {
for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
strip.setPixelColor(i, color); // Set pixel's color (in RAM)
strip.show(); // Update strip to match
delay(wait); // Pause for a moment
}
}
Final Results¶
Last update: 2022-05-29