Conclusions

The results of this project did meet our expectations - upon conclusion of the project, we were able to sort music on a Raspberry Pi depending on the weather, and then stream the music on an external device. Using the Spotify developer's API to access song characteristics already generated by Spotify and having an external devices stream the music allow this project to be very extensible for future improvements, both from a hardware and software perspective.

Future Work: Hardware

By not burdening the Pi with live music streaming directly from the Pi, more hardware peripherals can be attached to it in order to gain more information about a user's surroundings. This information can then be used to create a more sophisticated algorithm. The most apparent hardware improvement would be to incorporate ambient noise feedback from the microphone into the algorithm. In addition to seeing whether the surroundings are loud or quiet, the microphone can also be used to see if there are frequencies present corresponding to the human voice. If this is the case, and depending on the intensity of this input, then perhaps more party music can be played. Another hardware improvement could be to keep track of how many users are in a given space by detecting the Bluetooth signal intensity - since most people always have their phones on them, and most phones have bluetooth, there is a correlation between Bluetooth intensity and number of people. Another way to discern the number of people in a given room would be to see how many users are on a certain wifi network.

Among the hardware improvements that don't directly affect the algorithm is housing the Pi and all the peripherals in a plexiglass case. Ideally, the case would have buttons on it for play, pause, forward, rewind, like and dislike options.

Future Work: Software

Apart from improving the algorithm with inputs apart from weather, the protocol used to transfer a new song URI from the Pi to the laptop can also be improved. Right now, the IP address and password fo the streaming device are hardcoded into the 'orig_test' bash script. This does not make for a pleasant user experience. The Pi should prompt the user to enter the address and password of the streaming device. More buttons (both for music control and learning) can be implemented, and the like/dislike preferences of the user should be saved somewhere so that these preferences are taken into account the next time the Pi sorts music. The Pi should also auto-refresh the weather and re-sort the songs every hour or so, and the algorithm should take into account the time of day (for instance, upbeat music can be played in the mornings, and relaxing music can be played around bedtime, depending on the user's preferences).