Thank you for your donation!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HifiBerry DAC PRO+
#1
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
Reply
#2
Andrea, welcome! Great project you have there.

I think that stackoverflow or just google will be your best friends for this! Smile I don't doubt someone in the forum will come to the rescue, but since MoodeOS is a Raspbian, all you are asking for is very well discussed and documented over the internet, except perhaps the specific Display library, which I am also keen to hear experiences from the folks here. I know have seen two projects using screens that work really nicely.

I will follow this thread with interest. Any pictures of your setup and custom-made case would be great! Good luck
Rafa.
Reply
#3
Oh sure! I'm still waiting some stuff to start the assembly phase. First thing is the building of the case, I choose wooden MDF instead of the more traditional alluminium case. Obviously some additional challenge (e.g. painting...:-) but I think that, at the end of the story, wood is more flexible and has more appealing.
In the next days I'll post photos of the WIP.

Andrea
Reply
#4
I will also follow the thread because I am interested in the script for connecting the LCD 2x16 to mOOde audio. Smile
Reply
#5
(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 Blush  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
 (the two-character string #! is typically called the 'shebang'). This is general Linux/Python usage. Again, your search engine is your friend.

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
Reply
#6
There is no need to do everything from scratch and to 'reinvent the wheel' Wink
Almost everything related ATX style power management is done and also the screen scripts etc.
I using both on my RaspDAC
Check my thread here https://goo.gl/STn5hu or other threads on that forum
Reply
#7
Thanks for your replies! Surely I know that we don't need to reinvent the wheel (it happens very frequently in my job....:-(....).
I'll search on the web about that, starting from the links you mentioned above.

...and in the next days I'll keep you updated about the WIP...

ciaoooo
Andrea

P.S. Sorry for my bad scolastic English...
Reply
#8
See here how the author did LCD LCD or VFD.
https://www.jimkim.de/high-fidelity/digi...d-volumio/
I'm doing it with it and it's ok. In audio mode, File metadata ON, and add the path to the script. Modeaudio automatically creates the currentsong.txt file with the metadata of the song being played
To view the currentsong.txt file, you can open WinSCP on your PC.

Sorry, I do not speak English translators google translator

         
Reply


Forum Jump: