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

raspberrypi

3358 readers
4 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
[–] oddsys 1 points 10 months ago (1 children)

Sorry, I accidentally deleted my thread. I found a dataaheet which suggests it would need a microcontroller passing data using SPI, this would end up requiring code. It just sounds like you need a stand alone mp3 decoder with a trigger, like ones in cards. The search continues....

[–] theyoyomaster 1 points 10 months ago

Yeah, I'm looking at some of the options. I like this speaker set so an option with an analogue jack and USB port for power seems the way to go. Whether I go for a Pi or just a simple Arduino board doesn't matter to me. I think I'm going to be messing with code anyway to get the switch behavior I want since most existing MP3 options seem to be standard play/next/prev controlled with multiple momentary buttons vs a toggle. Even just toggle on to start the song each time will need a bit of customizing and at that point I might as well make it a bit more fancy with off being pause and then a timer for back on to be unpause if it's a short period or play from the beginning if it's been sitting for a few minutes.

It's still a first dive into any of this for me, Pi or Arduino but with a bit of help pointing in the right direction none of it seems that hard. Just trying to figure out which hardware to go with and once I have it playing with it until I get what I want.