LCD display and buttons in Python (tutorial and code)

Raspberry Pi related support

Re: LCD display and buttons in Python (tutorial and code)

Postby DennisPi » 29 Jan 2017, 10:37

Thx for your info, is it right dat i can not use de i2c interface on de backside of the LCD (4pins) because it is in use with the HifiBerry DAC+ ?
Because i follow all your steps succesfully. But there is nothing on my LCD screen !
DennisPi
 
Posts: 2
Joined: 28 Jan 2017, 20:42

Re: LCD display and buttons in Python (tutorial and code)

Postby den_hr » 07 Feb 2017, 22:07

den_hr
 
Posts: 52
Joined: 06 Feb 2015, 17:10
Location: Croatia

Re: LCD display and buttons in Python (tutorial and code)

Postby TommyBoy » 08 Feb 2017, 10:54

ya exactly good point,
i did order one of them i2c displays, and is going to have a test if i can make it write stuff from my rune player.
hopefully it dont affect dac and its performance, or its i2c, that would be the end of it..
User avatar
TommyBoy
 
Posts: 111
Joined: 29 Mar 2016, 14:04
Location: Copenhagen Denmark

Re: LCD display and buttons in Python (tutorial and code)

Postby den_hr » 12 Feb 2017, 17:17

BTW, currently I'm playing with another extension to this (LCD) system. I'm not too happy with the "bastard code" I currently have (mix of Randy's and my own Python stuff), and, besides, I've always been annoyed by the RasPi's lack of "proper" power supply handling (turning on/off).

So, my next idea (we'll see how it goes) is to use an Arduino to act as a "proper" ATX "power control" for Rune on RasPi - meaning you'll be able to shutdown the Rune RasPi server properly using either Web UI, power button, or an IR remote. Arduino will have some kind of relay to turn the power for RasPi on and off, and it will also take over the handling of the character LCD and IR remote signals. This also means that you'll be able not only to turn off RasPi using IR remote, but also to turn it ON via IR remote - just like a TV :)
(BTW, that means that Arduino part will always be powered on - but it will be in power saving mode, waiting for IR signal to turn ON, which doesn't use much power - certainly not more than a TV in standby...)

The hardware side on the Arduino is more or less done -as a concept - and now I have to do the "hard part" - serial communication between RasPi and Arduino (sending of formatted strings from Rune to Arduino to show on LCD, powerup and shutdown mesages and communication)...

Will take some more time, but so far, on the conceptual level, it looks promising. We'll see how it goes :)
den_hr
 
Posts: 52
Joined: 06 Feb 2015, 17:10
Location: Croatia

Re: LCD display and buttons in Python (tutorial and code)

Postby Legufix » 15 Feb 2017, 21:51

Legufix
 
Posts: 1
Joined: 16 Apr 2016, 00:31
Location: Austria

Re: LCD display and buttons in Python (tutorial and code)

Postby nmbb » 19 Feb 2017, 13:36

Hello. New here, after many tries and errors finally got my lcd i2c working. Except when I change music it didn't change on display neither the info and only shows the music player when rebooted. Using RuneAudioLCD, the other version (RuneAudioLCDMod) didn't worked here...

used:

RuneOs: 0.3-beta
RuneUI: 1.3-beta
Hw-env: RaspberryPi 2

cheap 20x4 lcd plus i2c bus

just in case...

http://imgur.com/a/eDZh3




UPDATE:

In web radio it displays the streaming function and time and the sampling rate... but when the music changed didn't update. Probably something missing, but what? Not a 100% newbie to this, but this time nothing occurs :)



Thanks
nmbb
 
Posts: 4
Joined: 16 Feb 2017, 01:51

Re: LCD display and buttons in Python (tutorial and code)

Postby nmbb » 19 Feb 2017, 18:40

3 nespresso later... and problem solved. For those who have the same trouble... found this on RuneAudioLCD/start.py

######### MPD PARAMETERS ##############
# Only if you know what you're doing!
HOST = 'runeaudio.local' ---> replace localhost with player name.local or IP
PORT = '6600'
PASSWORD = False
CON_ID = {'host':HOST, 'port':PORT}
#########################################

And that's it!
nmbb
 
Posts: 4
Joined: 16 Feb 2017, 01:51

Re: LCD display and buttons in Python (tutorial and code)

Postby Caudio12 » 26 May 2017, 21:48

Newbie - RuneAudio and Linux
First great thanks for all contributing to this forum, great work.
Now my "problem".
I have made a upgrade from Rasp Pi 2 and a HifiBerry Digi to the more advance Hifiberry Digi+ PRO and a Rasp 3 platform. This works fine after updated the Kernel to the latest, else the Digi+ PRO board will not work.
Running RuneAudio latest version 0.4. rasp Pi 3.
LCD 2 x 16 , with a i2c backpack - Adafruit.
My plan was to built in the new unit in a nice case with a LCD display and some buttons - looks nice. And this is why I writing to you all.
I am new in Linux, Python, vi etc, so the learning curve is quite steep.
I am not sure which tutorial to follow and what is actually is needed to get it working.
For the moment only two buttons works, NEXT and PREV.
The following is done:
First I followed the post on page 12, by s.k.
All worked fine. I can see that the i2c adress is 0x20
But nothing worked, LDC etc.
I then went to page 1,
And started from the top;
installed python2, python2-pip (eventhough I dont know if is needed, or if the page 12 list all is needed?)
installed gcc
installed RPi.GPO, version 0.6.3
tried to installed Adafruit_Python_CharLCD result in a mutiple list of errors. Is this module needed?

If a run the start.py I get this: Not any more, before I got an error IOError on a about 8 different sub modules related to the LCD display. Now just blank screen.
based on this I assume I have not been able to get all needed modules installed for the LCD, but the bottons are half working, two of four (!).

It would be great if someone could make a list what need to installed if you are running RuneAudio 0.4 on Rasp Pi 3 and have nothing else pre-installed. Now I am just guessing. I dont know what is included in the new RuneAudio 0.4 etc,
/CJ
Caudio12
 
Posts: 1
Joined: 26 May 2017, 20:44

Re: LCD display and buttons in Python (tutorial and code)

Postby hana » 19 Jun 2017, 13:01

Hi everybody
I have it finally working LCD 2004A i2c version, but only Xplod files are going as well, MOD code had a lot of issues with spaces and tabs, after all it throw up some other error code. so finally Xplod version is up and runnning except one thing: turn off backlight. does anybody same problem?
when I check basic working (it the display support it) with some test code, it works, but in Xplod script not.
thank you for help.
hana
 
Posts: 2
Joined: 21 Jun 2016, 07:42

Re: LCD display and buttons in Python (tutorial and code)

Postby jeroenrood » 25 Jun 2017, 17:31

Hello,
I've posted this problem also in the RuneAudio 0.4b thread, but ik think this might be a better place to ask for help.

I've switched to a RPi 3b (I had a RPi 1b fully functioning), and reinstalled te display. I've used the instructions of s.k. , and the display shows me all the info.
Only problem is that the sound disappears if I start the python program. I only get the sound back if I reboot.
If the sound is gone, the web interface and the display are still showing the tracks that should come out.
The display is connected by I2C.
Any suggestions?

Regards, Jeroen.
jeroenrood
 
Posts: 15
Joined: 06 Nov 2015, 14:45

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 15 guests