Hello fellow makers!
Two weeks ago, the CANduit group proposed three concepts for sensing an undesired behavior or environment. Our four group members all belong to the North Classroom at SVA Products of Design, which is notoriously known for being the coldest of studios, and although cannot solve this temperature problem, we are choosing to bring attention to the drastic range of temperatures one experiences in the studio.
To do this, we created a hanging lighting device that emits sound when the room’s temperature exceeds and dips below a particular degree. The device consists of a red and blue light, of which represent “warm” and “cold”. Warm temperatures trigger the red light to shine while Johnny Cash’s “Ring of Fire” plays for 10 seconds. Similarly, cold temperatures trigger the blue light to shine while “Cold Cold Cold” by Cage The Elephant plays for 10 seconds.
To start our process, we explored how our temperature sensor worked when exposed to heat and ice.
To add sound, we purchased a soundboard (Adafruit Audio FX Mini Sound Board – WAV/OGG Trigger – 2MB Flash) and amplifier (Adafruit Mono 2.5W Class D Audio Amplifier) This particular soundboard does not have any code, and works like a standard USB drive – you can drag and drop your files onto the soundboard.
In order to hang our device with little mess, we used a tubed-netting fabric to keep our wires together. These wires will be soldered to each of our LEDs and to the speaker. Our Arduino board and other bulky parts will be mounted on a sheet of plexiglass, as to be concealed. LEDs will inhabit a small plastic sphere that will hang from the ceiling.
The hanging cord will run from the LEDs, through the plexiglass mount, and along the wall until it reaches an outlet/power source.
Currently, we are having a hard time completing our code in the way that we would like our system to work. Adjusting the temperature does trigger our songs to play, but in a loop. We would only like for our song to play only once, not continuously until the temperature is triggered in the opposite direction (hot –> cold).
Because our DigitalWrite statements, the ones that trigger music to play, exist within our loop, once the trigger has started, the music is repeated. Despite telling our code to stop playing after one time, our trouble still lies in figuring out how to stop the music from playing after the audio clip has finished.