Introduction: Computational Sculpture Project - Poision

Working with a student from the Sculpture class, we created a sculpture that represents live data from the internet. For our project, we decided to use the Chicago City Data Portal's restaurant health inspection API. Our sculpture consists of a dingy restaurant scene with a giant rat cooking in the kitchen. Based on the number of health inspections failed each day, the speed of the rat and flicker rate of the LED lights will change. The project represents the theme of poison because restaurants that do not follow health codes can be a danger to health and can also cause food poisoning or foodborne illnesses.

Supplies

  • Particle Argon microcontroller
  • 5V 2A DC power adapter
  • HS-425BB servo motor
  • WS2812B addressable LED strip
  • Breadboard and wires

Step 1: Get Data

The Chicago City Data Portal provides an API for health inspection data. You can find the dataset here:

https://data.cityofchicago.org/Health-Human-Services/Food-Inspections/4ijn-s7e5/about_data

By sending a query to the following URL, you get only the risk level of each restaurant in a comma separated list

"http://data.cityofchicago.org/resource/4ijn-s7e5.csv?$select=risk&$where=inspection_date=%27" + inspectionDate + "%27&facility_type=%27Restaurant%27"

The inspection date can be obtained using the following code on Particle devices

String inspectionDate = Time.format((Time.now()-604800), "%Y-%m-%dT00:00:00.000");

This data can then be parsed to figure out how many restaurants failed their health inspections one week prior to the current date, and how high the risk was. In my code, this data is used to calculate a score that controls the speed of the project.

Step 2: Assemble Electronic Components

Before the components can be used in the sculpture, some work needs to be done to prepare them.

For the LED strips, cut appropriate lengths and solder on wires to connect them to the microcontroller. The LED strips have adhesive, but additional tape should be used to prevent them from falling.

For the servo, connect jumper wires from servo to the microcontroller. Hot glue can be used to attach objects to the servo's arm.

For the power supply, connect two wires to the barrel connector. Be careful when using an external power supply. Make sure the power supply says "5V" and has a current rating greater than or equal to 2A or 2000mA. Do not use an external power supply while the microcontroller is plugged in to your laptop.

Step 3: Final Product

After preparing the components you can install them in the sculpture and your project will be done.