This project functions as a moving sculpture that represents the effect of inflation on grocery prices. It is intended to represent the hardship endured by American families during the Covid-19 pandemic. The sculpture is set inside a grocery store featuring near empty shelves, a strip of lights, and a shopping cart that moves along a track.
Initially, all of the pixels on the Neopixel strip are turned on, and the shopping cart is located at the back edge of the track. After being set to its initial state, the photon makes a request to the U.S. Treasury API. This is done for the purpose of getting a CPI value on a given reference date for the sculpture to respond to. This sculpture changes by turning off select pixels on the light strip, and turning the motor, which moves the track forward by use of a linear actuator.
This initial reference date is included in the data sent to the Treasury API, and is set to midnight on January 1st 2020. This means the first data point for the CPI will be the CPI on a date that is greater than or equal to January 1st 2020. The handler method will then save retrieved date, and adjust the motors and lights based on whether or not the CPI exceeds a certain threshold.
Comments