In my Physical Computing Lab class, our final project has the topic of struggle, in which we get to portray while working with a partner from the sculpture class. My final project signifies the room of a teenager and it moves to show the change in number of shootings in Chicago. Linked below is a google drive that contains all of the videos for this project! Video 1 is the final project which should be viewed right now to contextualize the design process I am going to describe.
https://drive.google.com/drive/u/1/folders/1vvX6ZC_43cJUXPkc0ZC6F-1At84TBe0m
My approach for this project was to first have the physical components such as the lights and servos working, without reacting to certain data. Instead, I would include functions in my code that would show the different possibilities of the sculpture depending on whether there were more, or less shootings on average than a previous day.
In this attatched photo, it shows the breadboard I used to test out the police lights that would flash if there were more shootings. I am using a breadboard for all of my testing for my servos and LED strip.
In the google drive with all of the videos, the video titled "Video 2" shows me doing a live test of the servo pins and the LED reacting to a button press.
The next section of photos will show the assembly process!
The photos below show the power rails I used once I moved all of my components to be soldered on a copper circuit board.
Once the components reacted to the data changing, and the wiring and code worked properly, it was time to start assembling the components onto the sculpture that my partner was working on.
Written below is the code used to move the sculpture based on the data. actionGood runs where there are more shootings, actionGood runs when there are less shootings, and actionNeut runs when there are the same in a the past month than the previous day.
void actionBad(){
myServo1.write(170);
delay(200);
myServo2.write(0);
delay(200);
for(int i =0; i < 10; i++){
strip.setPixelColor(0, 255, 0, 0);
strip.setPixelColor(1, 255, 0, 0);
strip.setPixelColor(2, 255, 0, 0);
strip.setPixelColor(3, 0, 0, 0);
strip.setPixelColor(4, 0, 0, 0);
strip.setPixelColor(5, 0, 0, 0);
strip.show();
delay(200);
strip.setPixelColor(0, 0, 0, 0);
strip.setPixelColor(1, 0, 0, 0);
strip.setPixelColor(2, 0, 0, 0);
strip.setPixelColor(3, 0, 0, 0);
strip.setPixelColor(4, 0, 0, 0);
strip.setPixelColor(5, 0, 0, 0);
strip.show();
delay(200);
strip.setPixelColor(0, 255, 0, 0);
strip.setPixelColor(1, 255, 0, 0);
strip.setPixelColor(2, 255, 0, 0);
strip.setPixelColor(3, 0, 0, 0);
strip.setPixelColor(4, 0, 0, 0);
strip.setPixelColor(5, 0, 0, 0);
strip.show();
delay(200);
strip.setPixelColor(0, 0, 0, 0);
strip.setPixelColor(1, 0, 0, 0);
strip.setPixelColor(2, 0, 0, 0);
strip.setPixelColor(3, 0, 0, 255);
strip.setPixelColor(4, 0, 0, 255);
strip.setPixelColor(5, 0, 0, 255);
strip.show();
delay(200);
strip.setPixelColor(0, 0, 0, 0);
strip.setPixelColor(1, 0, 0, 0);
strip.setPixelColor(2, 0, 0, 0);
strip.setPixelColor(3, 0, 0, 0);
strip.setPixelColor(4, 0, 0, 0);
strip.setPixelColor(5, 0, 0, 0);
strip.show();
delay(200);
strip.setPixelColor(0, 0, 0, 0);
strip.setPixelColor(1, 0, 0, 0);
strip.setPixelColor(2, 0, 0, 0);
strip.setPixelColor(3, 0, 0, 255);
strip.setPixelColor(4, 0, 0, 255);
strip.setPixelColor(5, 0, 0, 255);
strip.show();
delay(200);
}
strip.setPixelColor(0, 0, 0, 0);
strip.setPixelColor(1, 0, 0, 0);
strip.setPixelColor(2, 0, 0, 0);
strip.setPixelColor(3, 0, 0, 0);
strip.setPixelColor(4, 0, 0, 0);
strip.setPixelColor(5, 0, 0, 0);
strip.show();
delay(200);
myServo1.write(0);
myServo2.write(170);
}
void actionGood(){
myServo1.write(0);
delay(1000);
myServo2.write(170);
delay(1000);
strip.setPixelColor(0, 255, 255, 255);
strip.setPixelColor(1, 255, 255, 255);
strip.setPixelColor(2, 255, 255, 255);
strip.setPixelColor(3, 255, 255, 255);
strip.setPixelColor(4, 255, 255, 255);
strip.setPixelColor(5, 255, 255, 255);
strip.show();
delay(200);
myServo1.write(170);
myServo2.write(0);
}
void actionNeut(){
myServo1.write(0);
delay(1000);
myServo2.write(170);
delay(1000);
strip.setPixelColor(0, 255, 255, 255);
strip.setPixelColor(1, 255, 255, 255);
strip.setPixelColor(2, 255, 255, 255);
strip.setPixelColor(3, 255, 255, 255);
strip.setPixelColor(4, 255, 255, 255);
strip.setPixelColor(5, 255, 255, 255);
strip.show();
delay(200);
myServo1.write(170);
myServo2.write(0);
}
Comments