more than anything else I am proud of my handwriting here lol :D
simulation1a**
simulation2**
simulation1b**
working RTC + demo mode**
sunrise/sunset view**
pan front to side**
daytime/evening view**
narrative description** A white house with frosted acrylic windows and roof. The house is divided in two sides, one side representing the time in Pittsburgh. The other representing Bangkok. The times are represented using light to show the change of light throughout each of their days.
me working on the house** In retrospect, the way I went about making the house wasn't my finest idea... It's basically just foam covered in spackle and then spray-painted with more texture. This process took many hours just for it to look sort of mediocre. I won't be doing this again. But in theme with my whole project, I was FaceTime calling my parents. (If you can see my computer propped up on the right.)
omg i laser cut ver. 3** It took a lot of trial and error for me to actually get the cuts I wanted. I worked with the laser cutters in the basement of Hunt a couple of times, which went ok, but because I tend to work at odd hours... and I didn't have access to the room... I had to find a different solution to laser-cut my final cuts. I discovered Purnell has its own laser cutter. And 3D printer! Lots of love to my scenic design friends for helping me out.
reiley is confused** Basically what I titled the file. I was getting a hang of the lights working and then as soon as I put my phone up to document me working everything decides to stop working. Which is just my luck I guess.
a couple of hours later lmao** My spirit looks a little more dead, but after troubleshooting a series of stupid mistakes, things are working again. Me testing and showing things are working to my audience of one: my iPhone 11. (Oh my gosh I just noticed my massive pile of clothes on my clothing rack please ignore it.)
a working clock and demo mode** Very excited for this development in the process... getting the RTC microcontroller to work and hold the time, getting a working potentiometer to implement a demo time... and getting the "current time" displaying on an LCD screen.
process reflection** This was a difficult project for me because I tried a lot of things I had never done before. I had never laser cut before, which I tackled when cutting the windows and roof. I also rarely work with my hands to create something physical, which I did for the entire form of this. I also had never worked with an Arduino which was the biggest challenge: trying to get my concept to actually work. I spent a lot of time working on the lights and the logic with the real-time clock microcontroller.
While I liked challenging myself in every facet of this project, it was quite stressful. So I am excited to traverse into the next week with a plan that I feel more comfortable executing. As always if I had more time, I would feel like I could have produced a better product that I would be more proud of, but luckily we have some time to rework and develop for WQED.
My plan for the next week+ is to really put more focus into my form. I plan to laser-cut the whole house again for a much cleaner look. Now that I have the Arduino logic working the way I want it to, I can shift my focus onto making the house look the way I want it to. I also intend to create a 1min demo mode and a simple soundscape to pair with that. Potentially also a video projection should I have time.
code submission**
// hi zach and petra ... (or whoever else is reading this lol???) we meet here yet again ...
// my name is reiley, although i'm sure you knew that !!
// this code is basically taking the current time data from the real-time clock microcontroller (DS323RTC),
// and using that to display different LED values depending on the location (pgh or bkk) and time of day.
// there's also a whole bit about putting the current time on the LCD display.
// thank you very much to zach for all ur help :D
#include <DS3232RTC.h>
#include <Wire.h>
#include <PololuLedStrip.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C screen(0x27, 16, 2);
DS3232RTC myRTC;
PololuLedStrip<12> ledStrip; //PITTSBURGH
PololuLedStrip<7> ledStripBKK; //BANGKOK
#define LED_COUNT 100
rgb_color colors[LED_COUNT]; //PITTSBURGH
rgb_color colorsBKK[LED_COUNT]; //BANGKOK
const int demoSwitch = 10;
const int potentiometer = A0;
void setup() {
Serial.begin(9600);
screen.init();
screen.backlight();
screen.home();
myRTC.begin();
setSyncProvider(myRTC.get); // the function to get the time from the RTC
if (timeStatus() != timeSet)
Serial.println("Unable to sync with the RTC");
else
Serial.println("RTC has set the system time");
pinMode(demoSwitch, INPUT);
pinMode(potentiometer, INPUT);
}
void loop() {
int currentMin = minute();
int minute24hr = hour() * 60 + currentMin;
if (digitalRead(demoSwitch) == HIGH) {
int potVal = analogRead(potentiometer);
minute24hr = map(potVal, 0, 1023, 0, 1440);
}
int minuteBKK = minute24hr + 720; //RANGE 720-2160
//PITTSBURGH LEDs//
if (minute24hr > 0 && minute24hr < 300) {
//00:00 - 05:00
int currentR = map(minute24hr, 0, 300, 18, 48);
int currentG = map(minute24hr, 0, 300, 5, 39);
int currentB = map(minute24hr, 0, 300, 81, 52);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 300 && minute24hr < 420) {
//05:00 - 07:00
int currentR = map(minute24hr, 300, 420, 48, 231);
int currentG = map(minute24hr, 300, 420, 39, 56);
int currentB = map(minute24hr, 300, 420, 52, 40);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 480 && minute24hr < 600) {
//08:00 - 10:00
int currentR = map(minute24hr, 480, 600, 231, 238);
int currentG = map(minute24hr, 480, 600, 56, 116);
int currentB = map(minute24hr, 480, 600, 40, 14);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 600 && minute24hr < 720) {
//10:00 - 12:00
int currentR = map(minute24hr, 600, 720, 238, 253);
int currentG = map(minute24hr, 600, 720, 116, 215);
int currentB = map(minute24hr, 600, 720, 14, 55);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 720 && minute24hr < 840) {
//12:00 - 14:00
int currentR = map(minute24hr, 720, 840, 253, 253);
int currentG = map(minute24hr, 720, 840, 215, 234);
int currentB = map(minute24hr, 720, 840, 55, 149);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 840 && minute24hr < 1020) {
//14:00 - 17:00
int currentR = map(minute24hr, 840, 1020, 253, 252);
int currentG = map(minute24hr, 840, 1020, 234, 127);
int currentB = map(minute24hr, 840, 1020, 149, 3);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 1020 && minute24hr < 1050) {
//17:00 - 17:30
int currentR = map(minute24hr, 1020, 1050, 252, 252);
int currentG = map(minute24hr, 1020, 1050, 127, 57);
int currentB = map(minute24hr, 1020, 1050, 3, 3);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 1050 && minute24hr < 1065) {
//17:30 - 17:45
int currentR = map(minute24hr, 1050, 1065, 252, 209);
int currentG = map(minute24hr, 1050, 1065, 57, 2);
int currentB = map(minute24hr, 1050, 1065, 3, 78);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 1065 && minute24hr < 1080) {
//17:45 - 18:00
int currentR = map(minute24hr, 1065, 1080, 209, 166);
int currentG = map(minute24hr, 1065, 1080, 2, 2);
int currentB = map(minute24hr, 1065, 1080, 78, 108);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 1080 && minute24hr < 1200) {
//18:00 - 20:00
int currentR = map(minute24hr, 1080, 1200, 166, 110);
int currentG = map(minute24hr, 1080, 1200, 2, 3);
int currentB = map(minute24hr, 1080, 1200, 108, 177);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
if (minute24hr > 1200 && minute24hr < 1440) {
//20:00 - 24:00
int currentR = map(minute24hr, 1200, 1440, 110, 18);
int currentG = map(minute24hr, 1200, 1440, 3, 5);
int currentB = map(minute24hr, 1200, 1440, 177, 81);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colors[i] = rgb_color(currentR, currentG, currentB);
}
}
//BANGKOK LEDs//
Serial.println(minuteBKK);
if (minuteBKK > 1440 && minuteBKK < 1740) {
//00:00 - 05:00
int currentRBKK = map(minuteBKK, 1440, 1740, 18, 48);
int currentGBKK = map(minuteBKK, 1440, 1740, 5, 39);
int currentBBKK = map(minuteBKK, 1440, 1740, 81, 52);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1740 && minuteBKK < 1860) {
//05:00 - 07:00
int currentRBKK = map(minuteBKK, 1740, 1860, 48, 231);
int currentGBKK = map(minuteBKK, 1740, 1860, 39, 56);
int currentBBKK = map(minuteBKK, 1740, 1860, 52, 40);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1920 && minuteBKK < 2040) {
//08:00 - 10:00
int currentRBKK = map(minuteBKK, 1920, 2040, 231, 238);
int currentGBKK = map(minuteBKK, 1920, 2040, 56, 116);
int currentBBKK = map(minuteBKK, 1920, 2040, 40, 14);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 2040 && minuteBKK < 2160) {
//10:00 - 12:00
int currentRBKK = map(minuteBKK, 2040, 2160, 238, 253);
int currentGBKK = map(minuteBKK, 2040, 2160, 116, 215);
int currentBBKK = map(minuteBKK, 2040, 2160, 14, 55);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 720 && minuteBKK < 840) {
//12:00 - 14:00
int currentRBKK = map(minuteBKK, 720, 840, 253, 253);
int currentGBKK = map(minuteBKK, 720, 840, 215, 234);
int currentBBKK = map(minuteBKK, 720, 840, 55, 149);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 840 && minuteBKK < 1020) {
//14:00 - 17:00
int currentRBKK = map(minuteBKK, 840, 1020, 253, 252);
int currentGBKK = map(minuteBKK, 840, 1020, 234, 127);
int currentBBKK = map(minuteBKK, 840, 1020, 149, 3);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1020 && minuteBKK < 1050) {
//17:00 - 17:30
int currentRBKK = map(minuteBKK, 1020, 1050, 252, 252);
int currentGBKK = map(minuteBKK, 1020, 1050, 127, 57);
int currentBBKK = map(minuteBKK, 1020, 1050, 3, 3);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1050 && minuteBKK < 1065) {
//17:30 - 17:45
int currentRBKK = map(minuteBKK, 1050, 1065, 252, 209);
int currentGBKK = map(minuteBKK, 1050, 1065, 57, 2);
int currentBBKK = map(minuteBKK, 1050, 1065, 3, 78);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1065 && minuteBKK < 1080) {
//17:45 - 18:00
int currentRBKK = map(minuteBKK, 1065, 1080, 209, 166);
int currentGBKK = map(minuteBKK, 1065, 1080, 2, 2);
int currentBBKK = map(minuteBKK, 1065, 1080, 78, 108);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1080 && minuteBKK < 1200) {
//18:00 - 20:00
int currentRBKK = map(minuteBKK, 1080, 1200, 166, 110);
int currentGBKK = map(minuteBKK, 1080, 1200, 2, 3);
int currentBBKK = map(minuteBKK, 1080, 1200, 108, 177);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
if (minuteBKK > 1200 && minuteBKK < 1440) {
//20:00 - 24:00
int currentRBKK = map(minuteBKK, 1200, 1440, 110, 18);
int currentGBKK = map(minuteBKK, 1200, 1440, 3, 5);
int currentBBKK = map(minuteBKK, 1200, 1440, 177, 81);
for (uint16_t i = 0; i < LED_COUNT; i++) {
colorsBKK[i] = rgb_color(currentRBKK, currentGBKK, currentBBKK);
}
}
ledStrip.write(colors, LED_COUNT); //WRITE TO PITTRBUGH
ledStripBKK.write(colorsBKK, LED_COUNT); //WRITE TO BANGKOK
delay(100);
int displayHour = minute24hr / 60;
int displayMinute = minute24hr % 60;
screen.clear();
screen.home();
screen.print("It is ");
if (displayHour < 10) {
screen.print("0");
}
screen.print(displayHour);
screen.print(":");
if (displayMinute < 10) {
screen.print("0");
}
screen.print(displayMinute);
screen.setCursor(0, 1);
screen.print("in PGH.");
}