Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Some background info: I do a Christmas Light show, one where it blinks to the music. This year I am going to be having a "jukebox" where a guest can press a button, and then the song will play. There will be 13 buttons individually hooked up to a device called an "Input pup." That is a piece of hardware from the company that makes the Christmas light controllers.

My question: On these buttons, I want to also have a wire going to a raspberry pi or arduino, something of that sort. When you press the button It would display on a screen "The current song is SONG NAME The Upcoming song is SONG NAME"

If there is no song in line, it could read something like "The Current Song is SONG NAME. There is no song selected to play next.

How can I accomplish this? This is what I think I know so far. I will need a raspberry pi, and something to connect the 13 buttons to the pi with. The pi will need to be running a script that tells it when button 1 is pressed, display the corresponding song. and somewhere in the script, it will need to act like a que, so if someone pressing 4 buttons, on the screen it will show all 4 songs are in line to be played next.

I want to be very clear that this WILL NOT BE actually controlling the lights, music, or even sending a signal for it to be played. This is for display purposes only so guests know what songs are in que.

One final thought; I guess the code will need to include the timing of the song, otherwise, how will it know that it's time to display the next song in line. So I guess it should be something like, when button one is pressed (providing there is a current song already playing), display the words "The next song is Carol of the bells for 200 seconds."

If there is no song currently playing (meaning no one pressed a button previously) AND there is no song to be played next, then the text should read something like "There are no songs selected. Please make your selection below."

What I have tried:

please see the following text above for what I know about this project.
Posted
Updated 5-Apr-17 22:59pm

1 solution

You have to connect the buttons to the GPIO ports of the Rapsberry Pi. How this can be done depends on which signal levels are used by your "Input pup" hardware. When the buttons are also connected to other harwdare (your light controller), you usually have to use level shifters to protect the Raspberry Pi inputs from voltages of the light controller and vice versa.

To react upon GPIO input changings you can use WiringPi[^]. It provides libraries and command line tools to configure the GPIO ports and do input and output.

For the software you have to decide which programming or script language you want to use and how you can get the information from your music queue.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900