Mood selection

By now, you should have a complete system that plays music and is connected to your Raspberry Pi Zero W board. Now, to make it more smart, let's add a mood selection system that plays the appropriate music playlist according to your mood. To do that, we first need to create a few playlists that will correspond to our mood. For example, let's define the first playlist as Acoustic Playlist and the second one as Rock Playlist. We can do that in many ways, one of which is to create two folders with the appropriate names and place some songs in each of them. Using cvlc that we mentioned earlier, we will be able to connect our music player with any script. So what is left is the trigger system.

The trigger system will be implemented according to the equipment that you have. The most easy mood selection system that we can create will consist of two buttons each one of them will trigger the corresponding playlist. So, first we need to connect two buttons in our Raspberry Pi Zero W board, and then, write some Python code to determine which button was pressed and which playlist will be the one that starts playing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.136