The Fire Alert Project helps represent the large amount of fire calls that happen in Chicago each day. On average, the a new call happens about every 5-10 minutes! By merging this information with a well-presentable sculpture, it appeals to an audience that has less of an attention span to just look at the statistics, increasing the awareness of fire emergencies.
MotivationIn our busy city, there are a lot of fire departments that have multiple fire calls each day. We thought it would be cool to have a project that combines all of the calls they get into one little box.
Objectives- Create API to get fire call data
- Set up three servos that turn to show the fire icons in the windows
- Use the LEDs to change the color gradually from red to yellow to show fire
- Make the speaker play a sound that mimics a fire truck siren
- Check to see if there is a new call every 5 minutes and if there is, play the project
- Construct everything to work in the sculpture
1. First, I got the API running with selenium and FastAPI with python from data on this website: https://call-log-api.edispatches.com/calls/index.php
2. Then, I got the speaker code from a previous project and edited it to sound like a siren
3. After that, I made the LED light up with a smooth transition by slowly changing the R, G, and B values of the color with a for loop
4. Lastly for the electronics, I got the three servos to spin up ~180 degrees so the fire icons can flip up
5. For the code, I made the Photon call the API every 5 minutes to check if a new fire call happened, and if it did, play the project
6. We then put everything into the sculpture and made some adjustments to hide the wires. Boom we're done
Making the API
It took me a while for me to get the API working because I was new to the FastAPI library in Python and there were some memory leaks that I still can't figure out, but it works good enough for me and Sam (we are sharing servers for the API).
Soldering
It didn't take me long to realize that this was definitely the most difficult part of the project for me. I definitely don't have a steady hand and messing up by connecting two things that shouldn't be connected pmo. I eventually got ok enough to get it to work so that's good, but still difficult.
Draw out the diagram multiple times before soldering so you know exactly where and what to solder because making mistakes can be time consuming to fix.
Media
Comments