Quantcast
Channel: Squeezebox : Community : Forums - Logitech Media Server
Viewing all articles
Browse latest Browse all 5300

Script to write to 16x2 LCD

$
0
0
Hi,
I am new to LMS - downloaded it and it's now running on a Raspi B. I find it works better than Mopidy or Volumio - primarily because the music doesn't stutter when I ask the poor RasPi to do something!!
Anyway, I have a HD44780 16x2 LCD hooked up and couldn't find a nice way to write to it.
- Squeezeslave does LCD output, but Spotify (official or Triode's otherwise excellent plugin) wouldnt stream to Squeezeslave
- The original squeezelite did play Spotify, but didn't output to LCD
- I did find the squeezelite+squeezeslave combo, but then found that the first line on the LCD displayed only "now playing" and the time remaining. A waste of good space, I thought, on a 16x2 LCD!!

So I hacked together a script - I am not a coder by any means, and do not know python - so please go easy. I wrote the script by reading online examples of python code.
Python's telnetlib didnt work for me - I couldnt figure out how to read the output line by line and escape out etc. Hence the use of subprocess.popen

I would be delighted with feedback to improve the code. I am not sure if this leaks memory etc. - no idea how to check either.

if it works for you, have fun. if it doesn't please let me know and I will do my best to debug. If you can tell me how to fix a bug you find, even better!! :-)

The github link is on the next post.

Viewing all articles
Browse latest Browse all 5300

Trending Articles