I worked on figuring out a prototype of the cells I’d use to make up my final project. I made two triangles out of rolled up paper, stapled two layers of fabric onto them, then attached tilt switches to the center of each. I then added a neopixel strip that would be activated by one of the tilt switches. You can see the results below:
From the back:
I was able to run the wires through the tubes to keep things neat.
Generally this setup is able to distinguish between the two cells, unless the frame is bumped. Giving a bit of slack to the fabric of each cell seems to help prevent cross-activating switches across cells. I had the tilt switches pointed up, and had the code set to activate the lights if the switch sent a 0.
The code is below:
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 40
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter–see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 100; // delay for half a second
bool on = 0;
void setup() {
Serial.begin(9600);
pinMode(5, INPUT);
pinMode(4, INPUT);
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
int One = digitalRead(5);
//Serial.println(One);
if (One == 0 && on ==0){
on = 1;
}
if (on == 1){
for(int i=0;i<14;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i+14, pixels.Color(delayval,delayval,delayval)); // Moderately bright green color.
// pixels.show(); // This sends the updated pixel color to the hardware.
// delay(1); // Delay for a period of time (in milliseconds).
}
Serial.println(delayval);
pixels.show();
delayval –;
if (delayval == -1){
on = 0;
delayval= 100;
}
}
}
I have also been researching the feasibility of building a geodesic dome. Given the time constraint and amount of materials required I am opting instead to make smaller frame that can hug around a wall or corner of a room to make a makeshift tent. This would be made with a large wooden frame filled in by smaller triangles made of rolled up paper to form the individual cells. Instead of neopixels, I plan to install a projector above the structure with white triangles or squares projection-mapped to the triangles of the structure, as I envision wiring up that many neopixels and getting the light to diffuse properly would be very difficult.
Aesthetically, I want to mimic the look of a butterfly or moths nest that is wispy and light, or cocoon-like, so that it could almost seem like a fantasy fairy dwelling that has a sense of magic to it.