-
An interactive awareness installation project with UN's Sustainable Development Goals in mind.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
-
power box button cap.stlModel of the button cap.Standard Tesselated Geometry - 7.70 kB - 09/02/2018 at 15:11 |
|
|
power box button base.stlModel of the button base.Standard Tesselated Geometry - 9.65 kB - 09/02/2018 at 15:11 |
|
|
interior.pdfThe vector for the housesAdobe Portable Document Format - 1.18 MB - 09/01/2018 at 07:11 |
|
|
dimension.pdfDimension of each piece of the DomeAdobe Portable Document Format - 744.89 kB - 09/01/2018 at 07:09 |
|
|
dome size.pdfThe accurate size of the whole structure.Adobe Portable Document Format - 1.76 MB - 09/01/2018 at 07:06 |
|
|
This are all the codes we used for making this whole project possible. And all the code here are used in Ardiuno.
#include <Adafruit_NeoPixel.h>
//LED
#define PinA 6 //WindowLight 4
#define PixelsA 24
#define PinC 7 //WindowLight 40
#define PixelsC 156
#define PinB 5 //StarLight
#define PixelsB 400 // total stars
int starsIncrement = 0;
int starsLighted = 0;
Adafruit_NeoPixel stripA = Adafruit_NeoPixel(PixelsA, PinA, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripC = Adafruit_NeoPixel(PixelsC, PinC, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripB = Adafruit_NeoPixel(PixelsB, PinB, NEO_GRB + NEO_KHZ800);
//Sensor
#define trigPin 13
#define echoPin 11
//boolean windowTrigger = false;
boolean sensorStart = false;
//Star Light
float redStates[PixelsB];
float blueStates[PixelsB];
float greenStates[PixelsB];
float fadeRate = 0.96;
//Window Light
#define waitTime 2
// 4 LED
byte buttonPins[] = {
22, 24, 26, 28, 30,
32
// 34, 36, 38, 40,
// 42, 44
//46, 48, 50,
//52, 31, 33, 35, 37,
//39, 41, 43, 45
};
boolean windowStatesT0[] = {
1, 1, 1, 1, 1,
1, 1
//, 1, 1, 1,
// 1, 1
//1, 1, 1,
//1, 1, 1, 1, 1,
//1, 1, 1, 1
};
boolean windowStatesT1[] = {
1, 1, 1, 1, 1,
1, 1
//, 1, 1, 1,
//1, 1,
//1, 1, 1,
//1, 1, 1, 1, 1,
//1, 1, 1, 1
};
// 12 LED
byte buttonPins2[] = {
// 22, 24, 26, 28, 30,
// 32, 34, 36, 38, 40,
// 42, 44
46, 48, 50, 52, 31,
33, 35, 37,//
//39, 41, 43, 45
};
boolean windowStatesT2[] = {
1, 1, 1, 1, 1,
1, 1, 1
//1, 1, 1, 1
//1, 1, 1,
//1, 1, 1, 1, 1,
//1, 1, 1, 1
};
boolean windowStatesT3[] = {
1, 1, 1, 1, 1,
1, 1, 1
//1, 1, 1, 1,
//1, 1, 1,
//1, 1, 1, 1, 1,
//1, 1, 1, 1
};
void setup() {
//Light A
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(PinA, OUTPUT);
stripA.begin();
stripA.show();
pinMode(PinB, OUTPUT);
stripB.begin();
stripB.show();
pinMode(PinC, OUTPUT);
stripC.begin();
stripC.show();
starsLighted = 0;
starsIncrement = int( PixelsB / sizeof(windowStatesT0) );
//Window Buttons
//4
for ( int i = 0; i < sizeof(buttonPins); i++ ) {
pinMode(buttonPins[i], OUTPUT);
digitalWrite(buttonPins[i], HIGH);
}
//12
for ( int i = 0; i < sizeof(buttonPins2); i++ ) {
pinMode(buttonPins2[i], OUTPUT);
digitalWrite(buttonPins2[i], HIGH);
}
Serial.begin (9600);
}
void loop() {
sensorTrigger();
if (starsLighted > 0) {
starLight();
}
checkButtons();
// checkButtons2();
}
void(* resetFunc) (void) = 0;
void sensorTrigger() {
//setGateway(13);
float duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
//setGateway(14);
duration = pulseIn(echoPin, HIGH, 1000);
if (duration > 0) {
distance = (duration / 2) * 0.0344;
}
else {
distance = 999;
}
if (sensorStart == false) {
if (distance <= 10) {
for ( int i = 0; i < sizeof(windowStatesT0); i++ ) {
//windowFadeIN(255, 127, 0, waitTime, i);
windowFadeIN2(255, 127, 0, waitTime, i);
sensorStart = true;
Serial.println("Hello");
//colorWipe(stripB.Color(127, 127, 127), 50); // Red
}
}
}
if (sensorStart == true) {
if (distance >= 10) {
//Serial.println("END");
resetFunc();
//sensorStart = false;
}
}
delay(50);
}
void starLight() {
constrain(starsLighted, 0, PixelsB);
int probabilityMargin = PixelsB / starsLighted;
if (random(probabilityMargin) <= 1) {
int i = random(0, starsLighted);
redStates[i] = 50;
greenStates[i] = 50;
blueStates[i] = 50;
int i2 = random(0, starsLighted);
redStates[i2] = 50;
greenStates[i2] = 50;
blueStates[i2] = 50;
int i3 = random(0, starsLighted);
redStates[i3] = 50;
greenStates[i3] = 50;
blueStates[i3] = 50;
int i4 = random(0, starsLighted);
redStates[i4] = 50;
greenStates[i4] = 50;
blueStates[i4] = 50;
int i5 = random(0, starsLighted);
redStates[i5] = 50;
greenStates[i5] = 50;
blueStates[i5] = 50;
...
Read more »
Lecturer Meeting comments & update:
Comments:
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates