Jason Chew, Daniel Kim
This project adaptively plays different soundtracks depending on the current state of precipitation, sunrise/sunset times, lighting conditions, and/or temperature, based on a Raspberry Pi’s location. The music plays in a web frontend, through which the user can also specify what environmental factors should play a role in the tracks played.
Our system has two base tracks, one for “daytime” and one for “nighttime.” The base tracks are chosen based on time or light level. Each track has three variations: one for clear weather, one for rainy weather, and one for snowy weather. The variations are chosen based on local weather conditions or temperature.
- Clone the repository to your Raspberry Pi
- Set up environment variable in the root directory
BROKER=<your_broker> PORT=<your_port> PID=<your_pi_id> WEATHER_API_KEY=<your_weather_api_key> USERNAME=<your_username(optional)> PASSWORD=<your_password(optional)> CERTS=<your_certs(optional)> - Activate the virtual environment:
python3 -m venv --system-site-packages emp
source emp/bin/activatepip3 install -r requirements.txtsudo apt install mosquitto-clientssudo apt-get install i2c-toolssudo apt-get install python3-smbus
