Tradition
This app allow us to recibe a random or a specific media such as photo, video or audio, and display it on the lcd display. Also we could finish projection with the same topic but with a message stop.
First we need to import the libraries that we are going to use.
Explaining the code.
First we get the first parameter and save it on the variable "tipo", to know with time of media we are going to display
Then we storage the second parameter, as the message
We define the path were we have all ready the media.
Then we use some conditions to know is we receive a random name, or we need to stop the program, or if we need only need to storage the name of the media.
If we recibe random, we get a random name of files with the function random.choice(os.listdir.("path"))
Then we look of with type of media we are going to reproduce.
Sound we use mpg123
Image we use feh
Video se use cvlc
Last updated
Was this helpful?