this post was submitted on 30 Jan 2024
11 points (86.7% liked)

raspberrypi

3263 readers
3 users here now

Community about the single-board computers, micro-controllers and related projects.

https://www.raspberrypi.com/

Other RaspberryPi communities on Lemmy

founded 4 years ago
MODERATORS
 

Hello, I’m starting a project to build something for a friends kid who’s father is a Huey pilot. I ordered the switch/panel in the image and want to 3d print an enclosure to mount it on that plays the song when the switch is in the on position.

Per the website the switch is fully functional, I just need to wire it to something to use it. Does anyone have suggestions on a bare bones controller to use and how to set it up to play an MP3 so long as the switch is in the on position? In a perfect world I would love for it to resume the position if it’s quickly toggled but restart if it sits more than a minute or so but realistically just playing the song would be more than enough.

While I’m new to Raspberry Pi I’m not that daunted by the task. I’ve been soldering since elementary school and have a degree in comp sci, but haven’t done any coding since graduating 10+ years ago. I do have a Pi hole but using an off the shelf package on a premade pi with step by step instructions doesn’t really count as “experience” for pi in my opinion.

Any suggestions are welcome, especially if someone can recommend some mini speakers that actually sound half decent. I’m not looking to tear a Bose Bluetooth apart but something slightly less tin-canny than a 2004 Nokia ringtone would be nice.

Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] theyoyomaster 1 points 9 months ago (1 children)

Space: I was going to 3d print a box for it. The switch is 3x3” so I was thinking of approximately a 3x3x3 cube but slightly angling the panel back a bit to truncate the front corner would look nice. I have leeway to adjust the enclosure as needed since I’m developing and printing it myself. A single 2-3” diameter speaker would fit and I can adjust the enclosure around it and convert the mp3 to mono as needed.

Power: Power is flexible to whatever solution seems best. I envisioned it as a desk ornament so first thought was a USB jack on the back. Not 100% tied to that but figured it seemed the easiest. My goal was to have the switch play the music so long as the device has power available.

Budget: I was envisioning $50 or so for components but can be flexible within reason. The controller needs to run a few dozen lines of code and have enough memory for a single mp3 so I can’t imagine it will be that expensive.

Time: Not stuck on any specific timeline. The friend is visiting with the kid in 2 weeks which would seem doable if I don’t get distracted. If not his birthday is in April and even then I can send it whenever it’s done or I see them next. She’s going through a divorce with the pilot father so a positive gift tied to the father would be really nice for him to have, there’s a whole backstory there that isn’t worth getting into. In short, 2.5 weeks would be great but “when it’s done” is acceptable.