Re: LCD display and buttons in Python (tutorial and code)
Posted: 25 Jun 2019, 16:21
Hi. How to make the radio play immediately after powering on? Simulate pressing a play button?
Embedded hi-fi music player
https://www.runeaudio.com/forum/
https://www.runeaudio.com/forum/lcd-display-and-buttons-in-python-tutorial-and-code-t1191-140.html
pixel wrote:Hi. How to make the radio play immediately after powering on? Simulate pressing a play button?
import os
print "Station Preset 1 Pressed"
os.system("mpc clear")
os.system("mpc load 'Radio Preset'")
os.system("mpc play 1")
You could do this without a python script. After creating the playlist, open the 'Queue' tab in the main player UI then click on 'Manage playlists' (below left). If you now click on 'Actions' (the stripy icon on the right) you can choose 'Randomly add songs to the queue' for your chosen playlist.lakeuk wrote:Have python script that will launch your chosen playlist, following example of the python code