The story behind this project has to do with my physical computing class my senior year of high school. We were tasked with a art based project to collaborate with a fellow student from the sculpture class with the year's theme being struggle. My partner and I chose to display this theme through the representation of gun violence in Chicago. We ideated the sculpture to display a map of Chicago with multiple districts outlined with each district having an LED behind it to represent some sort of gun violence instance. Additionally there would be a gunman in the sculpture with a arm which swings up an down with the use of a servo motor.
In order to execute this idea I first had to find a valid API that would provide me with sufficient data to complete this project. I ended up with an API from the Chicago Public Data Portal which pulls in gun violence police reports in the form of queries. I configured the link of the API to return a JSON package with only the 10 most recent queries and in each query only two parameters which were whether there was a gunshot injury in that instance and the ward of the city it took place in. The initial idea was to have an LED represent a ward but we chose to go with districts of Chicago such as Northside, Southwest side, etc. because constructing a contraption of LED's to go behind the map of Chicago for all 52 wards would be somewhat excessive. In response to this my partner and I organized and clumped wards into their respective districts and now it was my job to create a chain of LED's which would align with the districts my partner would make on the map of Chicago.
On the code side of things these districts were organized through arrays of integers and each array represented it own respective district based on the wards which resided within. Once the LED contraption was complete I needed to program the algorithm which would take the data from my Particle API Integration and use that data to determine if a LED would be on and what color it would be. It would only be on if a recent gun violence case was reported in that district and would blink yellow if there was no injury and red if there was. Once I had completed the code for this system I had to implement it into my Photon loop. The loop was ideated to have the lights turn on and off and each time the lights turn off the gunman's arm would go up and when they turn off the gunman's arm would come back down. This would be intended to loop and repeat itself. Once I got the loop to work properly I just had to test it with the servo and LED's and it was successful.
With the electronics and code now fully functional the next step to take was to solder all the components onto a proto-pcb board to make the hardware semi-permanent. This was a done with a power extension component in order to use a normal power adapter for the microcontroller. Once the protoboard was complete I was able to test out the electronics outside of a breadboard environment.
Protoboard Electronics Test Video
With the protoboard and electronics being fully completed the only thing left to do was attach it into our sculpture box which was so amazingly completed by my sculpture partner Bianca Verdin. With the wiring and electronics hidden within the box the only thing left to do was see if it functions properly which it thankfully did, marking the completion of our project.
















_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)

Comments