04-10-2018, 03:49 PM
(This post was last modified: 04-10-2018, 03:50 PM by TheOldPresbyope.
Edit Reason: typo
)
(04-10-2018, 12:12 PM)mancio61 Wrote: Hi all,
my first post in this forum.
I'm quite a newbie in the Raspberry + DAC + music-oriented OS.
I have a solid background in the IT world (more or less thirty years working in software domain), but only recently (two years ago) I approached the minicomputer world, starting with a RPi2 used as Media Player with OpenELEC/LibreELEC.
One month ago, I bought a new Raspy, a DAC board (the one in the subject) , a good pair or RCA cables, a Moode image on a microdSD and... bammm.... a new world appeared! So I create a temporary account on Tidal and start to hear very good music . The system is connected to a pure 2ch amplifier, and sounds very good. Immediately after, I had the idea to build by myself a case, adding a button to manage controlled shutdown of the system, a LCD 16x2 display and (in the future) a better PSU (hopefully a linear one).
My problem is that, depite my long experience in SW development and managment, I always worked in Windows environment, so for me the Linux world is "quasi" unknown. From the programming perspective I shouldn't have any problem, Phyton language is very simple compared to classicl C/C++/Java programming languages.
I'm searching for a:
1) on or more suitable library to manage the Display (it will be connected to the GPIO using I2C interface to have a more simplified wiriing). I'd like to show some simple message during the startup and the shutdown of the system, and obviously basic info dutring the playing (e.g. track name, elapsed time, author, etc)
2) I already have the phyton code to manage the button. I use a Mausberry simple board to do it, and they provide the small piece of code to support it.
3) A procedure (or a set of commands) to "install the phyton scripts, in order to be run them at system startup.
thanks in advance!
Andrea
Hi, Andrea.
Welcome aboard!
The specific organization of this new moOde Forum is still in flux as we collectively figure out what we're doing I'm hoping to see a section devoted to topical HowTo's, and this subject of using LCD displays with moOde is a definite candidate for it.
I won't talk about the details of driving an LCD display from an RPi because that is well covered in other places. There are a number of posts devoted to this subject in the old DIYAudio thread (look in http://www.diyaudio.com/forums/pc-based/...ry-pi.html). As Rafa pointed out, your web search engine is your friend.
Once that's been worked out, though, one creates a script to do it in (preferably) the default moOde user's home directory /home/pi. The moOde instructions assume this will be a Python script. As described on the moOde System Config page, the file containing this script must be executable (e.g., chmod +x) and its first line must contain only
Code:
#!/usr/bin/python
Note that there is no technical reason the script must be in Python or even that it must be a script rather than a compiled program. In tests, I've used a bash shell script, in which case the first line of the script must contain only
Code:
#!/bin/bash
As an aside, I was misled by the subject line of your original post. Since I still own an original-release HiFiBerry DAC Pro+ I was drawn to it. Folks who are knowledgeable or interested in LCD displays, on the other hand, might not bother. For now, it's no big deal, but as posts begin to accumulate (the old forum has nearly 15000 posts), good subject lines will become important in helping people navigate.
Regards,
Kent