https://github.com/bhavya-gopal/dunetunes
temperature-driven device that plays music and sends alerts using the Adafruit Clue and Spotify API
https://github.com/bhavya-gopal/dunetunes
adafruit-clue circuitpython spotify-api ubiquitous-computing
Last synced: 18 days ago
JSON representation
temperature-driven device that plays music and sends alerts using the Adafruit Clue and Spotify API
- Host: GitHub
- URL: https://github.com/bhavya-gopal/dunetunes
- Owner: bhavya-gopal
- Created: 2025-02-21T23:43:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-23T16:42:18.000Z (over 1 year ago)
- Last Synced: 2025-02-23T17:33:24.629Z (over 1 year ago)
- Topics: adafruit-clue, circuitpython, spotify-api, ubiquitous-computing
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DuneTunes 🎵🌡️
**DuneTunes** is a temperature-driven telltale designed for **desert environments**, where extreme temperature fluctuations occur between day and night. This project utilizes an **Adafruit Clue board**, **CircuitPython**, and the **Spotify API** to create an adaptive experience by playing music based on temperature conditions, while also alerting users to extreme heat.
## **Features**
- **Live Temperature & Humidity Display** – Uses the Clue board's built-in sensors.
- **Day & Night Music Mode** – Plays **Day Side** or **Night Side** tracks from *Night and Day* by Joe Jackson, based on temperature thresholds.
- **Extreme Heat Warning** – If the temperature exceeds **30°C** (configurable), it flashes a warning on-screen and plays an alarm track via **Spotify**.
- **User Interaction** – Pressing **Button A** stops the alarm.
## **🛠️ Hardware & Software Requirements**
### **🔹 Hardware**
- **Adafruit Clue board**
- **USB Type C to Micro B cable**
- **LiPo battery** (for portable use)
### **🔹 Software**
- **CircuitPython** (installed on the Clue board)
- **Mu Editor** (for writing and flashing code)
- **Python 3.x** (for running the laptop-side script)
- **Spotipy** (Spotify Web API library)
## **🖥️ How It Works**
1. The Clue board **continuously reads the temperature**.
2. It **sends temperature data via Serial** to a connected laptop.
3. A **Python script on the laptop** listens for this data and controls playback using the **Spotify API**.
4. **Different temperature ranges trigger different modes**:
- **Above 25°C → "Day Side" tracks play**
- **Below 25°C → "Night Side" tracks play**
- **Above 30°C → Alarm track plays + LED flashes**
5. The user can **press Button A** to stop the alarm.
## **Installation & Setup**
### **Set Up the Clue Board**
- Install **CircuitPython** on the Clue board: [Guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)
- Install **Mu Editor** for writing & flashing the CircuitPython script.
### **Clone This Repository**
```sh
git clone https://github.com/yourusername/dunetunes.git
cd dunetunes