This project is made to control an mp3 player using a touchpad.
The novelty we propose is to use a touchpad to select the mp3 songs to listen to.
In fact, we have imagined arranging the musical pieces in a sort of grid, ordering them according to criteria chosen by the user.
For example, I can use one of this "maps" to rapresent the music I like.
Obviously it would be quite simple to make an eye-catching cover for the trackpad to make the project pleasing to the eye.
The components and the functioningAs for the components used, in addition to PSoC™ 4100S Capsense Pioneer Kit we will only use a Raspberry pi4 to contain the music tracks and send them running with VLC.
The songs will be labeled with a name that has the form:
xx_yy_Title
where xx and yy are respectively the abscissa and the ordinate, ie the coordinates in which the user will choose to insert the piece in the table corresponding to the points on the touchpad.
A directory contains all the songs and the program uses it to create a list of songs ordered by distance from the point I touched.
For example, if I want to insert a song that is a love song but a pop song, too, for example Blue Eyes by Elton John, I will insert it in the grid with coordinates between pop and love song area.
If, on the other hand, I want to listen to a piece by Miles Davis, I should assign coordinates in the "Jazz" area, etc.
Obviously the classification of the songs must be done by the user according to the criteria chosen by him.
In our case, we have only inserted a few dozen pieces of music but we could insert many.
When we start the program and touch a point on the capacitive panel with our finger, the program will order the songs according to their "distance" with respect to the coordinates chosen by the user on the touchpad and the music will start starting from the song with the smallest distance compared to the coordinates chosen with the finger and the mp3 player.
Once that song is finished, it will continue to propose songs, passing to the one with greater distance and continuing in this way until all the songs present in the chosen folder have been played.
We started this project using one of the examples (CE224821 CapSense Touchpad) we found for the PSoC™ 4100S Capsense Pioneer Kit,
We modified it to configure a serial connection with the Raspberry pi4.
We have this python to create the song selection algorithm starting from the one at the minimum distance from the point chosen by the user, until all the songs in the directory are played.
ConclusionsThis project is only a first realization of an idea, it still needs to be perfected and enriched with functionality. For example, songs are now played based on distance from the center point on the touchpad, playing songs one by one, in full.
The first improvement I can think of is obviously also using the two buttons to navigate between the songs, for example going to the previous or next one, without having to wait for the conclusion.
Obviously they are small operations that would require little time to be implemented.
It would have been really great to be able to use bluetooth, it could in fact be connected to a PC or a Raspberry directly without using any cables.
Comments