This was a project was created for data visualization project for a physical computing class, and was completed in collaboration with the sculpture class. Each student was assigned a partner from the sculpture class where the sculpture student is in charge of creating the elements of the sculpture and the physical computing student is in charge of creating the electronics that move and display data. The theme for this year's project was struggle. The idea behind this sculpture, that matched the theme, was displaying the struggle of first responders. The way we did this was by creating an moving diorama of a firefighter scaling a burning building. The higher the fire and firefighter goes up the building the more fires there are and as a result, the level of struggle for first responders increases.
Pulling Wildfire DataTo get data for the project, Ambee API's wildfire data was used. A webhook was used to pull data from Ambee API. To set up a webhook using the particle environment first, create an integration and then create a custom webhook. The URL that gets put into the webhook can be found on the Ambee API documentation page for wildfires in the wildfires by place section. The request type in the webhook should be a get request and the request format should be query parameters. The parameters needed can also be found in the Ambee API documentation. To get an api key, you need to register for one with Ambee API. Calling this webhook will return an json array where each element corresponds to a different wildfire and is a json object that stores information about the wildfire. Since we only care about the number of wildfires we do not have to search through each element and can just find the length of the array. This can be done using the arduino json library.
The lights used in the project were Adafruit's neopixels. Adafruit has very detailed documentation and instructions on how to used the neopixel on their website. The first part of setting up the neopixels is testing the light sequence you want on a smaller strip of neopxels. After testing the lights, you can cut out each neopixel and attach it to a piece of carboard in a 3 by 6 arrangement. Then you have to solder each neopixel together. To light this arangement of 18 neopixels, you can create a 2D array and iterate through the array to set the color and brightness of each neopixel.
To use the stepper motor you first need to connect the power and ground pins on the motor controller to a 5v power source and ground. Then, connect the other 4 pins to any 4 digital pins on the photon except for the spi pin that is labeled mo, since that pin is needed to control the neopixels. You can then connect the stepper motor to the stepper motor controller. To control and set up the stepper motor, you can use the Stepper library. To tell the stepper which direction it needs to spin and for how long, we can set up a position system. We initialize an integer that stores the position on to 0. Using the data pulled from the api we can set the position to the number of fires. Then we subtract the number pulled from the api by the current position. This gives up how many positions the stepper motor needs to spin forwards or backwards.
Full BuildBefore placing the electronics into the box we need to put everything onto a protoboard. To do this lay everything out onto the protoboard, then solder each component in. Next, measure, cut, and solder solid core wire to connect each component to the right pins on the photon. After the protoborad is completed, you can then place everything into the box. The trickiest part is attaching the stepper motor to the fireman. The way the fireman moves from the stepper motor is through a timing belt and pulley system. To create the mechanical structure attach the pulley gear to the stepper motor. Then cut the timing belt to size and wrap it around the ladder, built by the sculpture student. Secure the timing belt in by attaching both ends of the timing belt together. Finally attach the fireman to the timing belt.
Comments